Five new junior developers and lots of complex tasks. What's now?

Our company has hired five new junior developers to help me to developer our product. Unfortunately the new features and incoming bug fixes usually require deeper knowledge than a recently graduated developer usually has (threading/concurrency, debugging performance bottlenecks in a complex system, etc.) Delegating (and planning) tasks which they (probably) can solve, answering their questions, mentoring/managing them, reviewing their code use up all of my time and I often feel that I could solve the issues less time than the whole delegating process takes (counting only my time). In addition I don't have time to solve the tasks which require deeper system knowledge/more advanced skills and it does not seem that it will change in the near future. So, what's now? What should I do to use their and my time effectively?


Why is Zend Framework so complicated?

I am web developer and have experience of developing several web applications in PHP. I have an idea of developing a product for myself and decided to use a MVC based framework because I really like the idea of MVC and how one can easily manage and modify the application without any difficulty. I chose Zend Framework and it seems more difficult than learning a new programming language. There are so many things going at one time even to run a small application. Similarly the idea of routing is very complex as it is new for a core programmer. I know that the guys here read thousand of such questions like one I am asking but I am not looking to learn Zend Framework overnight. I am willing to give as much time as it needs but until now it's making no sense to me. There are thousand of classes in the Zend library, but how would a noob know where to use a specfic class and how to use it? I am still finding it very difficult to understand the bootstrap of Zend Framework and its mapping. I read the manual, follow it and things start working but I really don't exactly how they are actually happening. I also still have no clue how models, views and controllers work together and how to plan an application in Zend Framework. When it comes to core php I exactly have the idea in my mind what to do and than easily translate them in code but in Zend Framework I don't know how to translate my idea.


Relation between " lines of the longest working program " in a language and familiarity with it?

In some computer master program online application, it says: > Please list the programming languages in which you have written programs. > For each language, indicate the length in lines of the longest working > program you have written in that language. You may approximate, but only > count those parts of the program that you wrote yourself.   1. I don't quite remember that, and I have never counted the lines of each program. Do programmers always know approximately how many lines in each of his programs, and keep record of them?   2. What is the relation between " lines of the longest working program " in a language and familiarity with it? Typically, how many lines will indicate the programmer being excellent, good, fair, or unfamiliar with the language? Is knowing "lines of the longest working program" really helpful?


How often do you run & test your code while programming?

Especially when writing new code from scratch in C, I find myself writing code for hours, even days without running the compiler for anything but an occasional syntax check. I tend to write bigger chunks of code carefully and test thoroughly only when I'm convinced that the code does what it's supposed to do by analysing the flow in my head. Don't get me wrong - I wouldn't write 1000 lines without testing at all (that would be gambling), but I would write a whole subroutine and test it (and fix it if necessary) after I think I'm finished. On the other side, I've seen mostly newbies that run & test their code after every line they enter in the editor and think that debuggers can be a substitute for carefulness and sanity. I consider this to be a lot of distraction once you've learned the language syntax. What do you think is the right balance between the two approaches? Of course the first one requires more experience, but does it affect productivity positively or negatively? Does the second one help you spot errors at a finer level?


Business layer access to the data layer

I have a Business layer (BL) and a Data layer (DL). I have an object o with a child objects collection of Type C. I would like to provide a semantics like the following o.Children.Add("info"). In the BL I would like to have a static CLASS that all of business layer classes uses to get a reference to the current datalayer instance. Is there any issue with that or must I use the factory pattern to limit creation to A class in the BL that knows the DL instance. * * * Let me Clarify. In the past when defining DL I create an interface IDL that the DL implements. The only objects I allow to be created from my BL are the factories which in their constructors take A reference to the IDL IE                  IDL idlRef = new DataLayer();          IBlFactory iFac = new BLFactory(IDL);        IBLa = IBlFactory.Geta(...);      As I have tried to work statics and singletons out of my system my factory creates all the objects and always passes the reference the the IDL to the new objects. Some on my team have complained about my copious use of interfaces and factories and would like to utilize concrete classes from the BL directly. So the issue is if you have a object which can be created IE a new object are you better severed by utilizing the factory. IE               IBLA oBLA = iFac.GetBLA();      or forcing the client to always passing the reference to the DL to new object. IE BLA oBLA = new BLA(idlRef); or would testability really be harmed by having one static property in the BL.               Static IDL CurrentDL;      Allowing albeit with some breaking of encapsulation more succinct style Assuming that each BL object will know what the currentDL is.


What are the best and worst policies you have seen used to run a programming team?

If I were to begin managing a team of programmers (which I'm not, I'm just asking out of curiosity) what are some of the office / team policies you have seen that are either particularly conducive or particularly prohibitive to productivity and teamwork? Some of the well known bad ones include regular overtime, micromanagement, not having admin rights, very strict hours, and endless meeting requirements. What else is there to avoid, and what interesting policies have you seen that do wonders for a team?


What are the best education options for software engineers after an undergraduate degree?

Having recently completed a BSC (computer science), I am working as software engineer. With one year of experience, what educational options are available to me? I want to move further in management. Please provide suggestions. I am considering a MSC but I got negative reply from lots of people.


Showing user and userinterface interaction on a sequence diagram

I need to draw a sequence diagram and I am not sure exactly if it is correct to show interaction between user and user interface in this diagram. For example I want to make a panel visible or invisible based on choosing a check box by user. Is it correct to have it on a sequence diagram? and how can I draw it? thanks


Difference between a REPL and interactive shell

Noob question. I am not quite able to tell the difference between a REPL and an interactive shell just by reading the definitions on Wikipedia. Wiki notes that REPL is a particular kind of interactive language shell. Is it a proper subset though? The Wiki definition seems to restrict the terminology REPL to Lisp-like languages, whereas the stated properties don't really contain any distinguishing features. In particular, would it be correct to call IPython a REPL?


How does dependency inversion principle work in languages without interfaces?

In C#/Java, the dependency inversion principle is often demonstrated by high- level classes that depends on an interface/abstraction (that it owns). Low- level classes will implement the interface, thus inverting the dependency. I wonder, how is it applied in object-oriented languages with no interface? For example, I'm not an expert in Ruby, but it seems that in this language you can't define interfaces like in Java/.NET


Any good tools for managing list of tasks?

We are changing how we manage low priority admin, support and development tasks. The plan is to have a 'Stack' of tasks, which anyone can pick up if/when they are light on work. We would like a tool to make it easy to find tasks, check them out and work on them as well as creating and prioritising them. We could do this at a simple level using a custom sharepoint list, as we have that available, and it fits in pretty well with our environment but has anyone got any experience of using any third party tools for this? It is somewhat similar to a standard ticketing system, so I guess we could look at things like Bugzilla, but I don't have any experience in such things (Our incident management system we use in hosue isn't really fit for the job). has anyone used one in this way? Or any other tool suggestions would be welcome.


When do you typically write a software module yourself vs. buying an existing product?

I'm trying to find out your decision rationale of when to do what. Would be great to learn from you. I'm happy to provide more context, but I want to make it general for now.


Using macro as an abstraction layer

I am having a discussion with a colleague about using macro as a thin (extremely) layer of abstraction vs using a function wrapper. The example that I used is Macro way.               #define StartOSTimer(period)  (microTimerStart(period))      Function wrapper method               void StartOSTimer(period)     {         microTimerStart(period);     }      Personally, I liked the second method as it allows for future modification, the #include dependencies are also abstracted as well.


How to provide a service with RESTful API?

Generally speaking, RESTful API's are very good for representing resources and collections of resources.   * http://example.com/resources   * http://example.com/resources/item17 And we are good, if we work with resource. However, what should be done, when you need to expose API which does an action which doesn't create/update or delete a resource. Couple of examples:   * You have an algorithm (as example add two numbers)   * You have an action which uses external system (as example send an email). I saw two approaches: **Represent an action as a subresource** POST http://example.com/resource/item17/sendemail On one hand, it's straightforward. On other hand, it start smelling SOAPy (read RPC calls). **Represent an action as a standalone resource** POST http://example.com/emailsender This looks more RESTful. However, it doesn't feel right too (only one of CRUD actions is implemented). This resource actually doesn't have a representation. I am not sure, may be there are other methods which I have missed. The question is - "Is there a consensus on this subject? What is the preferred way to do it?"


When a co-worker asks you to teach him what you know, do you share the information or keep it to yourself?

I am the only developer/DBA in a small IT department. There is another guy who can do it, but he's more of a backup as he spends his time working on IT support stuff. Anyway we have a new hire and I've been training him on the IT support side of things. Seems like he is eager to learn and be productive, but nobody is going out of their way to show him anything. He's been asking me to teach him database design, SQL, etc. For some reason, the boss has him working with me. He is also sending him to meetings that I go to, yet he hasn't said outright that I have to teach him anything. Meanwhile, the boss insists on doing a lot of the support work himself (i.e. he hoards information and doesn't delegate to anyone). I'm a little bit on the fence. First, the new guy doesn't yet have a strong foundation on the IT support functions which is where we really need help at this time. Second, I paid thousands of dollars for classes and spent many hours learning this stuff. Is it my responsibility to teach others skills that I had to learn on my own? Others here really aren't quick to share information so I'm not sure that I should either in this environment. I do know that if I get him involved, and get him started on projects, then I'd be responsible for his mistakes. I had to take the heat for the other guy when he made mistakes. OTOH the guy wants to learn something, is motivated, and I don't want to stop him. We've had our share of slackers in the group and it's nice to have someone who is willing to work for a change. So what would you guys do? Would you teach him the skills that you spent all of that time learning? Set him up with a test database on his PC and recommend some books for him? Encourage him to get a strong foundation in IT support first and ask later? We haven't had a new hire in years, let alone one that is interested in what I do, so this is new to me.


Designing around the constraints of external services in a client-server architecture

Suppose you have a client that interfaces with a server which in turn invokes an external service to fulfill some of the client's requests. I'm designing the client and server and need to accommodate the limitations of the external service. I have these options:   1. Encapsulate (as much as possible) all code dealing with the service's limitations inside the **server** application.   2. Encapsulate (as much as possible) all code dealing with the service's limitations inside the **client** application.   3. Design both the client and server applications around the external service's limitations. I had chosen option #1 because the server application was 'closer' to the external service and I didn't want to have to redesign the client if and when the external service was improved. However, now I'm being asked to choose option #3 by the server-side team so we can deal with the external service limitations in the API instead of by handling exceptions. Is there a design pattern I can reference to convince them (or myself) that one option is preferred? (Separation of concerns looks promising, but I haven't convinced myself that it's sufficient because it could also argue for option #2)


Using SQLDataSource / DataBound Controls in ASP.NET - Bad Practice?

When programming in ASP.NET, you can get very quick, effective functionality out of using DataBound controls (`GridView`, `FormView`, etc) with an `SQLDataSource` control on the page (In my opinion, anyway - I could be alone on that one). For instance, I often use these types of controls to create basic search functionality - like looking at Order History in a Shopping Cart application. However, this answer on SO got me thinking: **Is the use of the`SQLDataSource` control considered bad practice?** I've not been able to find any resources online that substantiate this claim, so I thought I'd ask here. The question on SO is regards calculating the grand total of a column in a `GridView`. The downsides of the `SQLDataSource` pointed out by the answerer (in their comment) include:   * ASPX is presentation, not business logic.   * This practice causes you to repeat SQL on every page that needs it.   * When you make a change to a DB you have to change SQL in aspx.   * Because it makes simple tasks like displaying grand total hard.   * Solution provided calculates grand total it in `DataBound` event. What if you don't use control with `DataBound` event?   * Because it's not testable. I'm somewhat new to ASP.NET development (coming from a Java / C# background), and I just wanted to make sure I'm not heading down the wrong path here (with using the `SQLDataSource` control).


Remembering user credentials in standalone Application

I'm developing a standalone application using java, I have a Login screen, wherein user enters his username and password. For each instance of the application, user have to enter his credentials. From a usability standpoint, I thought of keeping a remember me check Button. My question is, as I am not using any database, how do I persist the user details. I have some rough thoughts, storing them in a property file and retrieving. I think there may be better approaches than the one I had. Any Ideas and suggestions?


Interface extension

Suppose that I have an input stream interface, which defines a method for reading data. I also have a seekable interface which defines a method for seeking. A natural way of defining a input file is then to implement both input stream and seekable. I want to construct a data decoder from the input stream interface so I can read data from a file or from another stream. The problem is that I also want to implement seek functionality to the data decoder, since I want to be able to step individual records not raw bytes. This is not possible if I only provide an input stream, which does not have the bytewise seek method. Should I skip the seekable interface and add the seek method to input stream instead and force all streams to at least leave it as a nop. EDIT: The decoder does not need to seek if the client does not request a seek operation. Also the stream is associated with the decoder and cannot be changed after initialization


Is a readonly field in VB.NET thread safe? For example, see the code below:               Class Customer       ReadOnly Name As String            ReadOnly ZIP As Integer = 98112            Sub New(ByVal Name As String)              Me.Name = Name            End Sub     End Class


Why Increment Pointers?

I just recently started learning C++, and as most people (according to what I have been reading) I'm struggling with pointers. Not in the traditional sense, I understand what they are, and why they are used, and how can they be useful, however I can't understand how incrementing pointers would be useful, can anyone provide an explanation of how incrementing a pointer is a useful concept and idiomatic C++? This question came after I started reading the book A Tour of C++ by Bjarne Stroustrup, I was recommended this book, because I'm quite familiar with Java, and the guys over at Reddit told me that it would be a good 'switchover' book.


How do I ensure my site will be crawled when articles are generated by the database?

I wasn't sure how to ask the question. But basically, it's a textbook scenario. I'm working on a site that's article based, but the article information is stored in a database. Then the page is rendered with the information in the database based on the requested article id: For example: `http://www.mysite.com/articles/9851` I'm new to SEO, so I'm wondering how engines are able to crawl the contents of pages like this and/or what I need to do in order to ensure that it _will_ be crawled. So for instance, this site. All of the articles/posts on this site appear to live in a database somewhere. The URL has an ID which looks like it is used to tell the server which data to use to generate the page -- so the page doesn't actually exist somewhere, but it's template does. When I search google, I might find one of these posts based on the content of the post. I understand that crawlers normally just find a page and follow it's links and follow its links' links and so on, but how does that work when the site is search based like this? Do have to create a page that randomly picks articles out of the database so that the crawler can see it or something?


UI automation patterns and best practice for desktop applications

**Background** I'm currently automating some tests for a plugin for MS Office. We are creating Coded UI tests in VS 2010. I suppose I could use the " _Coded UI test builder_ " tool, but it does not really suit my particular case. Because of this I created my own UI Map class and extension methods for each UI Control/Map where I add different action functionality. For example press buttons or assert some UI values. The scenarios of the test cases are in the test classes. I am new in this area and also I'm new in working as a automation tester. **The question** Would people be kind enough to share their experience and advice for some good practices for test automation on desktop applications from a programming/design point of view?


How to reuse spaghetti code

We're working on a new firmware for our new V2 device. The company has an older V1 firmware (and hardware). Hardwares are similar to each other (but there are some differences) so basically we could use V1 firmware with "some" modifications. Unfortunately V1 firmware is spaghetti code. We need to support both hardware including new features, so code should be maintainable. We've tried to create a backlog with small stories. Each story would show a new working function to the user while it extracts out a reusable part of V1 code to a library project and use it in V2. It would have been kept both V1 and V2 firmwares always releasable and we would have been able to show a working demo early (with limited functionality at first). In time it turned out that management expects that it will be a short project (since hws are similar) and they suggest another approach: move everything to the library project and modify only those parts which are different. This approach seems riskier because we won't be able to demonstrate any progress (the first demo will be later, it's rather all or nothing, every module has to work more or less for the first demo) and I guess it could lead to unpredictable bug fixing. What should I take into account before deciding between the two approaches? Is there a third one?


Given a project and working with 1 other person - never worked with someone before

I'm taking a class where I work with a partner to implement the link layer of the OSI model. I've worked programmed with a partner once before and it went bad. Is the goal to divide the work up and decides who does what or should one person code and the other person reviews and switch roles after a while? Any tips are much appreciated. Literally I know nothing about working with a partner to program so even if it's basic please tell me.


What's a good question to measure the candidate's capacity to abstract?

It's part of my job to interview new candidates and I came up with a test that pretty much measure the coding skills of the candidates. However I couldn't (yet) come up with a good question to measure the candidate's capacity to deal with abstraction. Earlier I had the following question in my test: > Suppose a tree structure where each node stores an integer value. Draw the > simplest Class Diagram using UML that represents the domain model described. Then I'd ask: > Now change the model on question above to represent a leaf (i.e. a node that > has no children). Eventually, after several interviews, I realized those two questions were not giving me any clue if that candidate knew abstraction. Some people knew the answer but during the interview showed me they actually don't have a clue when it comes to abstract more complex subjects. I can't really have a very deep complex question in this test because:   1. The total time for the entire test is ~2h and they already spend about 1h to 1h30 in the first part (coding skills)   2. A good candidate might fail in a specific complex question and that would not really prove they can't abstract at all After reading this article I got intrigued when he says: > Inventing questions that force candidates to understand pointers without > using C isn’t too hard. Nearly any question that forces candidates to invent > a data structure (e.g., a hashtable, an AVL tree, or the like) will test how > they handle indirection, the idea that having a thing is different from > having a pointer to that thing. So I’ve picked a question that forces > candidates to design a data structure. And, sure enough, I see candidates > who have a lot of programming experience, but who don’t “get it”, completely > bomb out in my interview. The way I see it, inventing a data structure is a good way to measure abstraction skills. So my question is, does anyone know a good question (or a set of small questions) that could measure for abstraction skills in a test? I'm looking for those kind of questions that:   1. Don't depend on any language in particular   2. Can be answered by smart people   3. Can't be answered by people who know all books by heart   4. Will take average 40 min to solve   5. Will not produce huge amount of pages as an answer


Is a genetic algorithm needed when computation is infinitely fast?

From what I understand, genetic algorithms try out multiple variations and evaluate the fitness of each variation. Then they select the best variations, change them a bit and continue the process with the next generation. But what if we have unlimited computation resources? Can we then just try out all possible variations and evaluate their fitness without resorting to the complex process of breeding new generations? In other words, are genetic algorithms only needed when computation is expensive and when a brute-force method is impossible? Or do they add other benefits as well?


Should we avoid object creation in Java?

I was told by a colleague that in Java object creation is the most expensive operation you could perform. So I can only conclude to create as few objects as possible. This seems somewhat to defeat the purpose of object oriented programming. If we aren't creating objects then we are just writing one long class C style, for optimization?


What to do if you're stuck on a project because you got dumped in without the information you need?

I'm a junior developer and I'm supposed to be debugging this project, but the simple fact is that neither I, nor anybody else here (the only person who's worked on it just left recently) knows much about how it works. I'm frustrated because I'd like to get this done and get it off of my plate, but that's not really possible at the moment. Is this normal?


Large internal features on kanban

This days I'm reading some tutorials/advices about Kanban process and Agile methodologies, but I have two big questions about this Kanban methodology. What I understood is user stories are about adding bussiness value, like a feature which our customers can use. The main problem is we have a lot of features that looks trivial (simple form that manages synonyms for solr, for example) but are hard to implement and may take several days/weeks to complete, due to scaling/coordination details on our cluster (refreshing the synonyms using zk and reloading from database, for exmaple). How do you break down this user story into smaller ones since Kanban specificies every user story has to be independent? Can I break it down into user stories about implementation details? (implement coordination algorithm, implement X storage service, etc) And my last question is about architectural changes/refactoring. Since it doesn't add any bussiness value (invisible to our customers) how do you reflect this tasks in this methodology?


Which one of these designs is preferred?

In the case of an application with a single simple responsibility (eg, a simple replacement for `grep` or `wc`), which of these designs is preferred and why? I find that they are all testable and they all do their job. Does any of them have any significant advantages over the other? 1: All methods in the main class:               public class App {         public static void main(String[] args)         {             App app = new App();             AppInput input = app.readInput();             AppOutput output = app.processInputToOutput(input);             app.writeOutput(output);         }              public AppInput readInput() { .. }         public AppOutput processInputToOutput(AppInput input) { .. }         public void writeOutput(AppOutput output) { .. }     }      2: Basic methods in a separate class, main class only making calls to read and process input, and output result:               public class App {         public static void main(String[] args)         {             AppWorker worker = new AppWorker();             AppInput input = worker.readInput();             AppOutput output = worker.processInputToOutput(input);             worker.writeOutput(output);         }     }          public class AppWorker {         public AppInput readInput() { .. }         public AppOutput processInputToOutput(AppInput input) { .. }         public void writeOutput(AppOutput output) { .. }     }      3: Have all the work in a separate worker class, with the main class only instantiating the worker and triggering it to do its work:               public class App {         public static void main(String[] args)         {             AppWorker worker = new AppWorker();             worker.doYourWork();         }     }          public class AppWorker {         public void doYourWork()         {             AppInput input = readInput();             AppOutput output = processInputToOutput(input);             writeOutput(output);         }              public AppInput readInput() { .. }         public AppOutput processInputToOutput(AppInput input) { .. }         public void writeOutput(AppOutput output) { .. }          }


Generating all the words accepted by a deterministic finite automaton

1. Imagine you've got a finite deterministic automaton `A` defining some finite regular language `L`, consisting of `N` words.   2. The first question is: how would you determine the number of words `N`?   3. Then, I want to enumerate all these words, i.e. create a function like `f: {1..N} -> L`. Any suggestions? And the following restrictions apply:   * `N` may be large enough, for instance `[0-9A-Z]{8}` yields `N = 36^8` different combinations, so storing it all in memory is not an option.   * I want to be able to persist the state. For instance, compute `f(x)`, then store all the needed intermediate data in the DB, and some time later compute `f(x+1)`. What I've done for now is a simplification for fixed length words. Any suggestions for doing this for an arbitrary DFA? I suspect this is a common problem, so any algorithm references are welcome. Thanks!


How should I structure my database to gain maximum efficiently in this scenario?

I'm developing a PHP script that analyzes the web traffic of my clients websites. By placing a link to a javascript on the clients website (think of Google Analyses), my script harvests information like: the visitors IP address, reference link, current page link, user agent, etc. Now my clients can view these statistics via a control panel that I have build. These clients can also adjust profile settings, set firewall rules, create support tickets and pay invoices. Currently all the the traffic is stored in one table. You can imagine that this tabel would become very large as some my clients receive thousands of pageviews per day. Furthermore, all the traffic data of each client would be stored in the same table, creating a mess. This is the same for the firewall rules currently, and the invoice and support system. I'm looking for way to structure my database in a more organized way to hold large amounts of data of multiple users. This is the first project that I'm developing that deals with so much data, and would like to hear suggestions and tips. I was thinking of using multiple databases to structure the data. The main database will store users data (email,pass,id,etc) admin/website settings. Than each client will have an unique database labeled prefix_userid, which carry tables holding their traffic, invoice, and support ticket data. Would this be a solution, and would it slow down or speed up overall performances (that is spreading the data over muliple databases). I have a solid VPS, but would like to safe and be as effient as possible.


Help with design structure choice: Using classes or library of functions

So I have GUI Class that will call another class called `ImageProcessor` that contains a bunch functions that will perform image processing algorithms like `edgeDetection, gaussianblur, contourfinding, contour map generations, etc.` The GUI passes an image to `ImageProcessor`, which performs one of those algorithm on it and it returns the image back to the GUI to display. So essentially `ImageProcessor` is a library of independent image processing functions right now. It is called in the GUI like so               Image image = ImageProcessor.EdgeDetection(oldImage);      Some of the algorithms procedures require many functions, and some can be done in a single function or even one line. All these functions for the algorithms jam packed into ImageProcessor can be pretty messy, and ImageProcessor doesn't sound it should be a library. So I was thinking about making every algorithm be a class with a shared interface say `IAlgorithm.` Then I pass the IAlgorithm interface from the GUI to the ImageProcessor.               public interface IAlgorithm{        public Image Process();     }     public class ImageProcessor{            public Image Process(IAlgorithm TheAlgorithm){             return IAlgorithm.Process();       }     }      Calling in the GUI like so `Image image = ImageProcessor.Process(new EdgeDetection(oldImage));` I think it makes sense in an object point of view, but the problem is I'll end up with some classes that are just one function. What do you think is a better design, or are they both crap and you have a much better idea? Thanks!


Should functions always return a success/failure status?

> **Possible Duplicate:**   >  When and why you should use void (instead of i.e. bool/int) What is the reasoning behind making all functions (and methods!) return a uniform type, usually int, as a status? To me it feels odd; especially when you're calling a getter and it returns a status (which is usually the same always) and sets one of the parameters to the value you're getting.


Allow app analytics opt-out?

Given that mobile app analytics reporting can cost a customer data traffic that, unlike a web app, use of the mobile app may otherwise not require, should a mobile app provide a user accessible setting to allow customers to opt out of app analytics collection or reporting? If and where should a customer be notified that running a given mobile app might capture and transmit analytics data on the app's usage? Are there any app stores where either of the above is a requirement?


Hiring Developers - Any tips on being more efficient?

I represent a software company that is in process of building a large software development team. We are picky in who we hire and have really good retention rate (most of the devs have been here for an average of 5-6 years). We've been spending a lot of developers' and HR time and have a low applications to hire ratio. Here's the process we use:   * HR Interview on phone - Involves asking basic behaviorial and tech questions   * Online test - Involves a 30 minute technical test   * Technical Phone interview - A 60 minute interview by a developer   * Onsite Interview - A 60-90 minute interview by several senior developers Although this process has been working, we've been spending way too much time on interviews. Any thoughts on how this can be done differently? Our goal is to automate any tasks if possible still retaining the quality of talent. * * * **UPDATE:** Thanks for the responses. Need to clarify a few things. Our aim is to reduce the number of applicants that go from one stage to the other. Here's our current numbers.   1. We receive 1000 resumes   2. 800 resumes pass the HR interview   3. 500 pass the online test   4. 100 pass the initial phone screen   5. 10 pass the onsite and get hired As you can see, we need to do a better job of weeding out the candidates earlier on in the process. Can we do a better job in the way the online test evaluates people? Here are more details on the process based on some responses:   * HR Interview on phone - They ask very basic technical questions (What is a CLR?) to weed out as many people as possible   * Online test - Have around 10 basic questions with 3 coding questions   * Tech phone screen - Covers a variety of technologies. We don't care if the applicant doesn't know everything as long as they can demonstrate they will be able to pick up new technologies and come up to speed quickly   * Onsite - Coding questions in front of the developers. More architectural level questions.


Creating a custom GUI. App/DE/WM?

I am starting with this project of mine of writing a custom UI for linux. What would happen is:   * The computer would boot into this UI which would not be the typical taskbar/icons/startbutton kind of thing. Think more like a dedicated UI instead of a general purpose one.   * It would provide access to wifi, ethernet, bluetooth etc. Basically have access to most system resources. Up until this point, I don't planning on having a file manager for the user. The app would take care of this. Sort of the way apps on mobile phones work. My first instinct was to work (fork an existing one) on a custom DE like Gnome/KDE. So I read up a lot about window managers and desktop environments and while window managers seem to be the best option for what I am trying to do, another idea occurred to me which would be much less complicated. I could simply (I know!) write an app which the native OS boots into, without any splash screen etc. So, take a distro like Arch Linux, strip it down to the basics and then build an app on top of that. I would like to get some advice on what the best way to go forward with this would be. Do you guys concur that an app is better to go with? Please excuse me if the question seems naive. Any suggestions/ideas welcome.


Forced to write Stored Procedures

Can you think of some reasons that the management force the developers to write and call Stored Procedures instead of inline SQL statements directly? Even a very simple CRUD statement, writing a stored procedure takes more time and create extra workload.


How important is blogging/tutorial generation to career development?

Lately I've seen a number of application developer job postings with a dedicated field for personal blog site. I was wondering how important keeping a blog and generating tech related content is for career development? How does having one/not having one effect your potential for getting hired?


Which controller should I put for a search action that touches many different models?

I currently have the following models and am designing search functionality that searches within these 3 models: Locations Users User_friends Should I create a search controller or should I put the action in one of the existing locations, users, or user_friends controllers? If so should it be pluralized - searches_controller or just search_controller?


What licence should I choose for my project?

I originally thought of creative commons when while reading a book about wordpress (professional wordpress), I learned that I should also specify that the product is provided > ... WITHOUT ANY WARRANTY; without even the implied warranty of > MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE and they recommend GNU GPL. How do I write a license or select 1? btw, what does `MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE` mean actually? Isn't without warranty enough?


Use of underscores and earmuffs

I have seen underscores and earmuffs (like `_good_` or `*good*`) frequently used in conversations among programmers. All I know is that underscores are used to denote private variables or methods in languages like C, Python etc. and earmuffs are the preferred way of indicating that something is a global variable. Do these have any other punctuational meaning when they are used outside code, in mailing lists etc? Does the highlighted word have any hidden meaning or expression added to it? Or, are they just like air quotes?


What is a battery backup up cache?

I've read an article about Innodb performance optimization an in that post the author was repeatedly mentioning someting named a "battery back up cache". It is not clear for me what he was talking about and google did not help either. My guess is that this is some kind of backup storage in case there is a power outage. Am I right?


How to promote Scala to the management?

As a developer I like Scala and could tell the management about technical benefits of the language. But even if management understands that a superior technology has business impact, I fear that they don't understand what I'd be talking about. What arguments would you present to managers with technical backgrounds (computer scientists not programming for many years)?


Sql Server Data Tools & Entity Framework - is there any synergy here?

Coming out of a project using Linq2Sql, I suspect that the next (bigger) one might push me into the arms of Entity Framework. I've done some reading-up on the subject, but what I haven't managed to find is a coherent story about how SQL Server Data Tools and Entity Framework should/could/might be used together.   * Were they conceived totally separately, and using them together is stroking the wrong way?   * Are they somehow totally orthogonal and I'm missing the point? Some reasons why I think I might want both:   * SSDT is great for having 'compiled' (checked) and easily versionable sql and schema   * But the SSDT 'migration/update' story is not convincing (to me): "Update anything" works ok for schema, but there's no way (AFAIK) that it can ever work for data.   * On the other hand, I haven't tried the EF migration to know if it presents similar problems, but the Up/Down bits look quite handy.


Is it good/safe OOP practice to have a method whose only purpose is to send/retrieve data from another class?

I have a class that performs basic MySQL operations. This is all in PHP.               class dbTables {         public $name;         protected $fields = array(); // array of dbTableField objects         public $result_sets = array();         protected $primary_key; // filled using getFields() from __construct()                   public function __construct($table_name) {             $this->name = $table_name;             $this->getFields();         }         public function removeWhitespace($table_name) {             $this->name = $table_name;             $this->getFields();         }         // etc...     }      So all you need is the table name to create the object, and construct automatically gets a bunch of field data from `INFORMATION_SCHEMA` (names, data types, etc). I also have a method for removing whitespace from a column It's currently located in another class, but I'm thinking of moving into the above `dbTables` class. You can see the method below. I don't think it's really necessary to read the method to answer my question, but it could be helpful.               protected function removeWhiteSpace($target_field,$abbrev_field,$from_size,$to_size,$options) {         // optional conditions based on original character length and resulting character length.         /* options: from_size = all/longer_than/shorter_than         *   to_size = all/longer_than/shorter_than         */         $temp_table = $this->table_name;                 $sql = "UPDATE `$temp_table`              SET `undo_sku` = `$target_field`, `$target_field` = REPLACE(`$target_field`,' ',''), `$abbrev_field` = 'w'";         $where = array();             if($options['from_size'] == 'longer_than') {                 $where[] = "`$target_field` > $from_size";             } else if($options['from_size'] == 'shorter_than') {                 $where[] = "`$target_field` < $from_size";             }             if($options['to_size'] == 'longer_than') {                 $where[] = "LENGTH(REPLACE(`$target_field`,' ','')) > $to_size";             } else if($options['from_size'] == 'shorter_than') {                 $where[] = "LENGTH(REPLACE(`$target_field`,' ','')) < $to_size";             }                            //WHERE `$target_field` = '' AND LENGTH(REPLACE(`vnd_sku`,' ','')) <= $string_length";         $result = mysql_query($sql);     }      Now, if I do move it into `dbTables`, I will still want to use the functionality in the other class. Should I just instantiate a `dbTables` object whenever I need to use `removeWhitespace`? Or, could I give `dbTables` its own `removeWhitespace` method like this:               protected function removeWhiteSpace($target_field,$abbrev_field,$from_size,$to_size,$options) {       /* options: from_size = all/longer_than/shorter_than       * to_size = all/longer_than/shorter_than       */       $dbtable = new dbTables($this->table_name);       $temp_table = $this->table_name;            $result = $dbtable->removeWhiteSpace($target_field,$abbrev_field,$from_size,$to_size,$options);       return $result;     }      The advantage I see is that now I have a way to limit instantiation of the `dbTables` object in various other classes. Methods that need to use `removeWhiteSpace` can use `$this->removeWhiteSpace` instead of instantiating a `dbTables` object. The class's own `removeWhiteSpace` method takes care of that. I'm kind of new to OOP, though, so I'm just wondering if that is good practice or bad. I also hope I'm asking this question in the right place. I'm pretty sure it's not a StackOverflow question.


Are there any benefits to removing unused script files in a web site/project?

VS Web sites/projects come loaded with several .js files, most of which I don't use (e.g., I use a CDN for newer versions of jQuery and jQuery-UI). I know it's safe to remove these unneeded .js files from my projects, but is there any benefit from doing so? Are they deployed to the web server if left alone?


What is the most productive way to start and manage the development of a large web application?

I've searched high and low for a good answer to this question, and as far as I can gather it's just a combination of standard organization tools (keeping a routine, good folder structure, extensive documentation) and making sure you think about each step before you move on. I'm planning on starting a new web application very soon, and I'm finding the volume of choices I need to make almost overwhelming. Although I usually create applications using Django I've been considering the alternatives recently. Also, things like which host should I go for, which version control system should I use and which bit should I start on first are driving me crazy. I was wondering if anyone had any professional advice for me on how I can better manage what I'm doing so that I get this project off on the right foot.


What are the key points to evaluate to select a good SMS gateway?

We are planning to add a "SMS verification account" option for our customers. (So we will only send SMS. We do not need a short code.) We have found several companies who offer SMS gateways through REST APIs (we use PHP). As we are totally new to the SMS world, we are wondering: What are the key points to pay attention to/evaluate to select a good SMS gateway?


Can a user relicense LGPL as GPL or GPL as AGPL?

The LGPL (we'll just assume version 3 for all in discussion for ease), is a less restrictive version of the GPL, likewise, the AGPL, is a more restrictive version of the GPL, but is it possible to use LGPL code, make additions(or don't), and relicense it as GPL or AGPL; can GPL code be modified and relicensed as AGPL?


When thinking about dates and times - is midnight today in the past or future?

This is always a puzzle to me- and I realise that it is not strictly an issue in programming or software development, but it seems to be a reasonable common one in our field. For example, if I were to set an expiry datetime as 2011-04-08 00:00:00 - and given my current local time is 10:45 on the 8th already - have I already expired? Or do I still have half a day or so left? Is there are universal standard for which end of the day midnight 'belongs' to? Or should I take a leaf from the British military, and say that the day ends at 23:59:59 and starts at 00:00:01 and that there is no midnight?


Can One Get a Solid Programming Foundation Without Going To College/University?

First, I have already searched the site and read all the previous "self-taught vs. college" topics. The majority of the answers defended that going to college was the best choice, for two main reasons:   1. Going to college gives you the paper, which is essential to landing jobs, especially in tough economic times.   2. Going to college gives you a solid programming base, teaching you the principles that will be essential regardless of the language/path you take after. Here comes my question: I am not worried about reason 1 at all, because I already have my own company (I build websites/ do affiliate marketing) and a stable financial situation, so I am pretty sure I won't need to look around for a job. I am worried about reason 2 though. That is, I want to make sure I'll have as solid a programming foundation as anyone else out there, and I am wondering if that is possible with self-learning. Suppose I take my time to study the very basics, like discrete maths, algorithm design, programming logic, computer architecture, Assembly, C programming, databases and data structures - mostly using books,online resources and lots of coding. Say I spend 1-2 years covering those basics. Do you think my foundation would be solid, or still lack in comparison to someone who went to college?


Useful programming languages for hardware programming

I am thinking to take the next semester a course called "Digital systems architecture", and I know that we need to program micro-controllers with several programming languages such as C, C++, verilog, and VHDL. I want to be prepared to take that course, but I need to know if I need to study deeper these languages. At this moment, I have taken one course in basic Java dealing with basic methods, data types, loop structures, vectors, matrices, and GUI programing. Must I study deeper Java and then go with C, and C++? Besides, I know basic verilog and VHDL.


Spring AOP advice order

In Spring AOP, I can add an aspect at the following locations   * before a method executes (using MethodBeforeAdvice)   * after a method executes (using AfterReturningAdvice)   * around a method (both before and after a method executes) (using MethodInterceptor) If I have all three types of advice, is the order of execution always as follows?   * Around (before part)   * Before   * Method itself   * After   * Around (after part)


How do software patches and updates work?

So, how exactly do software patches work. If there is a certain bug in the source code of a program, how is this source code changed when one installs a patch? After the patch has been installed how is the program 'automatically' rebuilt?


Pair Programming and ISO 27001

I’ve been working in an eXtreme programming team and doing pair programming for over 7 years in a windows environment. When we first started doing it someone would log in with their windows credentials and therefore all access to domain resources, and more specifically version control, would be accountable to that windows user. Eventually we have evolved to have windows pairing accounts for specific pairing stations (e.g pairA, pairB, PairC etc…). All the devs know the passwords to these accounts. Accountability for commits (check-ins) is achieved by putting the programmers initials in the comment during the commit. Up until now this has worked fine for us, but my company is currently going through a ISO 27001 audit and this was flagged up by the auditor as a risk. I have a number of possible solutions such as creating a pairing account for every pair combination, but I really would like to know whether anyone else has encountered this problem and how they solved it? What solution was acceptable by the auditors?


How to manage, in practice, licence files when combining GPL and BSD licensed code?

I am writing code that uses one library with GPL (not LGPL) license, and one with the 3-clause BSD license. Since I link to GPL-licensed library, my code will need to be GPL as well. How should I, in practice, deal with the original LICENSE.txt from the BSD-library? (A) Can I distribute a project so that the main source code is GPL-licensed, and then some subdirectory is BSD-licensed? (B) If I were not only to link to libraries, but to use and combine the BSD and GPL code in a more involved manner, what to do with the LICENSE.txt then? The 3-clause BSD text tells: "Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer." so apparently I should retain the copyright notice, and that list of conditions, somewhere. But then I'll also need to put the GPL license txt-file somewhere. Further, apparently I don't need to retain the "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:" part of the BSD license text, since it only tells me to retain the other parts. So, how, and in which text files, should I in practice organize the GPL license text and the parts of the BSD license and copyrights that I retain? EDIT: So in case B, I would be taking 3-clause BSD licensed code, and redistributing it under GPL, which is permitted, as 3-clause BSD license is (one-way) compatible with GPL. I am just asking how to deal with the license texts and textfiles in practice.


Using raw types in Java method signatures

In general I try to avoid using raw types in the signature of methods in the libraries I develop. However, lately I am starting to relax this (self- adopted) rule-of-thumb, and I am starting to write raw types more often than before. For example, assuming a method receiving _any_ list as parameter (i.e., the type of the list members is not important), I was tempted before to declare it as:               void myMethod(List<?> list) {...}      But now I am starting to write more and more:               void myMethod(List list) {...}      Because it is shorter. My concrete question is: In the scenario where type parameters are not important, is using raw types in method parameters considered a good practice ? If not, why not ? The only problem I see is being condemned to see an eternal warning in the IDE I use (although probably that can be deactivated somewhere), but I would like to be sure I am not missing something else. **Update:** Got fully convinced I should use generics everywhere after reading the paragraph below here: > Use of raw types is discouraged. The Java Language Specification even states > that it is possible that future versions of the Java programming language > will disallow the use of raw types.


Should a EULA be translated?

I have a application which will be available in 4 languages: French, German, Danish and English. All the text in the app will be translated, but should the EULA also be translated? What is the common way of handling this? The lawyer has accepted the english version of the EULA and I assume all the translated versions should also be accepted then. Is it okay just to use a English EULA?


How to Pick Which MCPD Certification is Appropriate

I've been developing on multiple platforms for years, including Java, PHP, Flash/Flex, ASP.NET (including MVC), Ruby on Rails, and many others. I've decided (for various reasons) that it's time to pick one technology to learn deep, instead of learning many technologies wide; and I chose .NET. I've decided that one crucial move will be to grab some Microsoft certifications -- if only to show that I'm serious about this as my technology of choice. But **how do I choose which certification to take?** There are several of them, with similar-sounding descriptions. Although I will probably choose between **the windows and web versions of the MCPD.** I'm targeting team lead and project-manager style jobs, if that helps. **Edit:** The reason I want to do certification is because my resume reads as:   * 3 years JEE   * 3 years C++   * 2.5 years Flash/Flex   * 2 years .NET   * 1 year Ruby on Rails   * 1 year PHP When I say I have "ten years of experience" and apply for a job that says "5+ years of experience in .NET," I know I can learn and do the work. But I don't have those five years; I gave them to Flex, C++, and JEE. I think considering my specific situation, a certification is a (small) step in the right direction.


Using third party/ open source controls

I usually feel reluctant to use any third party or open source controls while coding in Objective-C iPhone due to following reasons. Open source controls are developed in incremental manner. So once integrated I have to keep looking for update and will have to update my code. Will increase effort. Open source controls may likely add memory leaks and thus make application incompetent in terms of memory. Third party libraries are difficult to manage, as well as they keep conflicting with your classes. Please correct me on these points, so that I may feel comfortable with open source codes.


Is SCRUM Methodology a good technique to go with in crucial deadline project?

I am just join a firm and they are working in a (their called) SCRUM methodology, They have very sharp deadline and the project development doesnt seems to have any direction or neither it is looking like (This is what we want.) I am developing a module which doesnt have Database, neither I have any information which needs to linked to this module, the people who are linked to the modules and messed up with their own work because which I am not able to get their support in it. Now could anyone suggest me that is this the good way to go ahead in this methodology, which doesnt contain any DB table for to be developed module? Please Suggest Something.. Thanks


How to formalize feature requests

I'm new to developing software and have been handling feature requests for an internal web-app I built. Sometimes the feature requests are straight-forward and require minimal business logic for me to implement, so I talk to the person for a bit, write their requirements down, and get to work. However, I'm starting to work on feature X where X has dark-corners of business-logic and special-case scenarios keep on popping-up because I didn't ask the right questions and/or the person I'm speaking with didn't think about mentioning it. So I'm curious, how do professionals handle this process? Some things that I thought of are:   1. Require feature requests be written down with the appropriate requirements.   2. Understand their job well-enough so I can do mine. An example to illustrate a similar problem is, implementing government regulations in code. I researched the regulations, created a flowchart and went from there. I could have saved a couple days had someone well-versed in said regulations, written the requirements down and handed them to me. I'm doing the same thing for feature X, except, nothing is written down so I'm unable to deduce their business logic without going through a step-by-step process through their job. Even that fails sometimes, because some special- case wasn't present that day. Using the above example, is it the responsibility of the developer to research this or something that should be provided? Any suggestions for making this process go a bit smoother?


SQL: empty string vs NULL value

I know this subject is a bit controversial and there are a lot of various articles/opinions floating around the internet. Unfortunatelly, most of them assume the person doesn't know what the difference between NULL and empty string is. So they tell stories about surprising results with joins/aggregates and generally do a bit more advanced SQL lessons. By doing this, they absolutely miss the whole point and are therefore useless for me. So hopefully this question and all answers will move subject a bit forward. Let's suppose I have a table with personal information (name, birth, etc) where one of the columns is an email address with varchar type. We assume that for some reason some people might not want to provide an email address. When inserting such data (without email) into the table, there are two available choices: set cell to NULL or set it to empty string (''). Let's assume that I'm aware of all the technical implications of choosing one solution over another and I can create correct SQL queries for either scenario. The problem is even when both values differ on the technical level, they are exactly the same on logical level. After looking at NULL and '' I came to a single conclusion: I don't know email address of the guy. Also no matter how hard i tried, I was not able to sent an e-mail using either NULL or empty string, so apparently most SMTP servers out there agree with my logic. So i tend to use NULL where i don't know the value and consider empty string a bad thing. After some intense discussions with colleagues i came with two questions:   1. am I right in assuming that using empty string for an unknown value is causing a database to "lie" about the facts? To be more precise: using SQL's idea of what is value and what is not, I might come to conclusion: we have e-mail address, just by finding out it is not null. But then later on, when trying to send e-mail I'll come to contradictory conclusion: no, we don't have e-mail address, that @!#$ Database must have been lying!   2. Is there any logical scenario in which an empty string '' could be such a good carrier of important information (besides value and no value), which would be troublesome/inefficient to store by any other way (like additional column). I've seen many posts claiming that sometimes it's good to use empty string along with real values and NULLs, but so far haven't seen a scenario that would be logical (in terms of SQL/DB design). P.S. Some people will be tempted to answer, that it is just a matter of personal taste. I don't agree. To me it is a design decision with important consequences. So i'd like to see answers where opion about this is backed by some logical and/or technical reasons.


How to organize methods that check username/email availability in a REST API?

I am developing a RESTful API in my project, but I do not have experience on that. To fill these gaps I've been watching some videos, mainly from Apigee, which are great. One situation brings a lot of discussion on my project and I hope you can help me clear it out. The client using the API is able to create a user by posting to my /Users url, but it has some requirements as: name format, username availability, email availability, valid region and many others. I can easily validate the name format in my client app, that would be easy. The problem is when it comes to availability (mainly if the email and the user name are available to be user or are already taken). We have two different lines of thoughts on my team: the first one would break each verification in a different url, something like /Users/EmailAvailable and /Users/UsernameAvailable ou /Available/Email and /Available/Username They claim that it would make the interface cleaner (more intuitive) and would also keep cohesion, since one method has only one responsibility. The second line of thought is to have only one URL /User/Verify and it will verify either the username, email or both, depending on the JSON it receives. They claim that it would only require one trip to the server and that cohesion is not a problem because, since the URLs are not necessarily mapped to methods, they can divide the calls into methods that do one thing each. They also claim that the interface shouldn't care about cohesion My questions: 1- Are these arguments about cohesion from the second line of though valid? 2- How would you do? (Either one of those or any other that you know of) thanks!


How to convince teammates to use TDD

I am the only person on my team that use TDD. How do I make them to use it? I am annoyed that when I pull, someone's code will break my tests and I am the one who has to fix them. Will using github, fork and pull request solve this problem, so that they need to pass the test before the pull is accepted? I am not the project manager and I can't seems to convince her to use it.


Learn Java resource (for programming noobs) that doesn't use an IDE

> **Possible Duplicate:**   >  Best Java book you have read so far I have learned to program some in Ruby, but I'm having trouble grasping OO concepts. I've been told that there are a lot of guides/books that teach object oriented programming that use Java. I've heard that Java is a good language for learning OO for a number of reasons... haha, reasons that I don't know. Anyway, I tried to use an IDE (Eclipse) and I don't care much for it. Are there any good guides/books/videos that focus on teaching OO concepts using Java that don't use an IDE such as Eclipse to teach it?


Beginning to code with java (No coding experience)

> **Possible Duplicate:**   >  Best Java book you have read so far I want to learn java but, I have absolutely no coding experience. what is the best website, book, or anything that is best at teaching java?


What is the best book to prepare for a Java interview?

> **Possible Duplicate:**   >  How to prepare yourself for programming interview questions? I found older questions but I was wondering if newer, better books/guides have been published in the last two years. I am interviewing for a technology analyst position in finance and I expect to have a lot of technical questions based on running time/data structures etc. This is for an entry-level position so I have not had previous experience programming for work, only experience through my coursework.


What is a good Planned Release/Freeze/Beta Methodology?

I've been working on a nightmare of a project for some months now. The product is a small Ruby on Rails app/website for internal use by a small group of people. I'm coming up to the finish line and I'd like the actual beta release to go smoothly. I still have a number of small bugs that affect functionality in a minor way and do not break the build. This is my first job and first time taking a product to launch. I'm curious what people's methodologies are for a smooth transition to bring your application from a development environment to a live production environment.


Whats the difference between a Ledger and a list of transactions?

re: algorithm and data structure concepts When accountants talk about Ledgers they have something very specific in mind. As a programmer I'm very used to thinking about tables of information, but clearly there are specific things that make a ledger a ledger. So, given a simple list of transactions (date, money in, money out, notes) what needs to be added/changed to make that list into something Accountants would call a ledger? e.g. formatting considerations, does it have to be immutable, does it have to reflect something happening in a real bank account somewhere, does it have to have some sort of 'foreign key' describing which entity each transaction refers to...


TDD and complete test coverage where exponential test cases are needed

I am working on a list comparator to assist sorting an unordered list of search results per very specific requirements from our client. The requirements call for a ranked relevance algorithm with the following rules in order of importance:   1. Exact match on name   2. All words of search query in name or a synonym of the result   3. Some words of search query in name or synonym of the result (% descending)   4. All words of the search query in the description   5. Some words of the search query in the description (% descending)   6. Last modified date descending The natural design choice for this comparator seemed to be a scored ranking based on powers of 2. The sum of lesser important rules can never be more than a positive match on a higher importance rule. This is achieved by the following score:   1. 32   2. 16   3. 8 (Secondary tie-breaker score based on % descending)   4. 4   5. 2 (Secondary tie-breaker score based on % descending)   6. 1 In the TDD spirit I decided to start with my unit tests first. To have a test case for each unique scenario would be at a minimum 63 unique test cases not considering additional test cases for secondary tie breaker logic on rules 3 and 5. This seems overbearing. The actual tests will actually be less though. Based on the actual rules themselves certain rules ensure that lower rules will always be true (Eg. When 'All Search Query words appear in description' then rule 'Some Search Query words appear in description' will always be true). Still is the level of effort in writing out each of these test cases worth it? Is this the level of testing that is typically called for when talking about 100% test coverage in TDD? If not then what would be an acceptable alternative testing strategy?


Guidelines for HTML/CSS/JS optimization process

Currently we have a Development server on which we write the HTML/CSS/JS code. We do not optimize our code using compressors/minifiers. So our deployment process from Development to Production is simply to copy the files on the Development server to the Production server. But now we are planning to use compressors/minifiers. We are confused about the process we should follow. Currently we use a single JS file called common.js and a single CSS file called common.css. Also now we are planning to use multiple CSS files in Dev like reset.css, common.css, etc. and when deploying them to production we will be combining them to a single CSS file. The simplest process I can think of is:   1. Make an exact copy of the development files on the Development server. Use the copy in the further steps.   2. Combine all CSS files to a single CSS file say common.css. Same with JS files. Delete the other files for example reset.css.   3. Compress/minify common.css and common.js to common.min.css and common.min.js. Delete common.css and common.js.   4. In all the HTML files remove all link tags and script tags except for common.css and common.js   5. In all the HTML files modify the script src and link href from common.js to common.min.js and common.css to common.min.css.   6. Copy all the files to Production server.   7. Delete the copy This looks too tedious for us. What can be a better process? Is there any tool which can do the optimization (above steps) automatically. It looks like it would not be very difficult to write a script which performs all of the above steps. But I would like to use an existing tool rather than developing one myself. I would like to put the efforts only if such a tool does not exist. Also when is the testing generally performed? I think it should be performed on the optimized files (just in case the compressors have some bug). But then the process would become more tedious as the above process would have to be repeated after every Test-Bugfix cycle.


Object Constraint Language (OCL) for Stack in java.util package

I have an exam coming up and I'm looking at past papers to get some ideas of what to expect. I'm a bit stuck on the following one and would really appreciate if someone could give some example answers. Write preconditions and postconditions in OCL for each of the following operations (included in the Stack class in the java.util package):   * (1) Boolean empty() - Tests if this stack is empty   * (2) E peek() - Looks at the object at the top of this stack without removing from the stack   * (3) E pop() - Removes the object at the top of this stack and returns that object as the value of this operation   * (4) E push(E item) - pushes an item onto the top of this stack Here E denotes the type of elements in the stack. My attempts are as follows:               Boolean empty()     pre: none     post: self -> IsEmpty() = true     //should this be result -> IsEmpty() = true because it returns a boolean value?          E peek()     pre: self -> NotEmpty() = true     post: result = ???      // I lose hope at this stage.       I also don't know if I should be referencing the elements in the stack. For example: self.elements -> IsEmpty() = true If anyone could help me out I'd really appreciate it. **EDIT** A friend has the following ideas:               context Stack empty()     pre: self.data.size = 0          context Stack peek()     pre: self.data.AsSequence.first          context Stack pop()     pre: !self.data.isEmpty     post: self.data.AsSequence.first.remove (not sure about this one)     post: self.data.count = @pre:data - 1          context Stack push(E Item)     post: self.data.asSquence.prepend(E.asSequence)     post: self.data.size = @pre.data.size + 1


Why is CS never a topic of conversation of the layman?

Granted, every profession has it's technicalities. If you are an MD, you better know the anatomy of the human body, and if you are astronomer, you better know your calculus. Yet, you don't have to know these more advance topics to know that smoking might give you lung cancer because of carcinogens or the moon revolves around the earth because of gravity (thank you Discovery Channel). There's sort of a common knowledge (at least in more developed countries) of these more advanced topics. With that said, **why are things like recursive descent parsing, BNF, or Turing machines hardly ever mentioned outsided 3000 or 4000 level classes in a university setting or between colleagues?** Even back in my days before college in my pursuit of knowledge on how computers work, these very important topics (IMHO) never seem to get the light of day. Many different sources and sites go into "What is a processor?" or "What is RAM?", or "What is an OS?". You might get lucky and discover something about programming languages and how they play a role in how applications are created, but nothing about the tools for creating the language itself. To extend this idea, Dennis Ritchie died shortly after Steve Jobs, yet Dennis Ritchie got very little press compared to Steve Jobs. So, the heart of my question: **Does the public in general not care to hear about computer science topics that make the technology in their lives work, or does the computer science community not lend itself to the general public to close the knowledge gap?** Am I wrong to think the general public has the same thirst for knowledge on how things work as I do? Please consider the question carefully before answering or vote closing please.


In Scrum, why shouldn't the Product Owner and ScrumMaster roles be combined?

In the more traditional projects that I've worked on, the project manager (and, on larger projects, there might be associate/deputy/assistant project managers should one person be unavailable) is the person responsible for communicating with the customer, receiving project health and status updates, determining scheduling and budgeting, managing the process, ensuring the team has what they need to complete tasks, and so on. In Scrum, however, these responsibilities are split between the Product Owner and the ScrumMaster. The Product Owner is the voice of the customer. They interact directly with the customer, create user stories, organize and prioritize the product backlog, and other user/customer facing issues. The ScrumMaster handles the process, overseeing meetings (including estimation and planning), removing impediments, and monitoring the overall health of the project, making adjustments as needed. I've read in multiple sources, including Wikipedia, that the role of ScrumMaster and Product Owner should be held by two different people. I've not only read about, but worked on successful "traditional" style projects where the activities of both were handled by a single individual. In fact, it makes more sense for one to three people to be responsible for handling project (including human resources/staffing) and process level tasks, as they often go hand-in-hand. Process changes have an impact on scheduling, budgeting, quality, and other project-level goals, and project changes have an impact on process. Why does Scrum call for isolating these activities into two roles? What advantages does this actually provide? Has anyone been on a successful Scrum project where the Product Owner and ScrumMaster were the same individual?


Where should I look to know which technology is used in a web app?

Let's say, I have one or more web app I find interesting, and as I want to do something similar, I would like to know on which technology they are based (programming language, database, web server, framework, ...). Is there any site where such information is centralized? If not, where should I look for this information?


Delegate vs Interfaces-Any more clarifications available?

After reading the article- When to Use Delegates Instead of Interfaces (C# Programming Guide), I need some help understanding the below given points, which I found to be not so clear (for me). Any examples or detailed explanations available for these? **Use a delegate when:**   * An eventing design pattern is used.   * It is desirable to encapsulate a static method.   * Easy composition is desired.   * A class may need more than one implementation of the method. **Use an interface when:**   * There are a group of related methods that may be called.   * A class only needs one implementation of the method. _**My Questions are,_**   1. What do they mean by an eventing design pattern?   2. How the composition turns out to be easy if a delegate is used?   3. if there is a group of related methods that may be called,then use interface-What benefit it has?   4. if a class only needs one implementation of the method, use interface-how is it justified in terms of benefits?


Interview Assignment: Production, Bug-free, or Bells & Whistles?

I was given a small project to complete over the weekend for an interview. Not a very difficult project at all. Fortunately, I was able to spend all my time designing, developing, and testing the application rather than having to research something I wasn't familiar with. After working out a couple of critical bugs, I am left wondering if I should add anything more to the assignment. Assume, at this point:   * everything is commented   * no bugs found   * any known exceptions are handled   * 8 hours remain in allotted time **So, is it better to go ahead and submit a bug-free, working assignment earlier than the deadline?** ...or ... **Take the fully allotted time to add a feature (obviously something simple like logging)?** ...or ... **Provide a list of TODOs that could improve flexibility, scalability, or general usability?** These would be improvements that simply could not be done within a day or could introduce too many issues to resolve in the time allotted. FWIW: the project consisted of creating a multi-threaded sort controller implementing 3 different sorting algorithms; results to be displayed on WinForms UI.


Terminology for class

I am integrating with a Financial Management System (FMS). I have a class that prepares a set of objects (each of these objects is called a TransactionEntity). These are then passed to the FMS.      I give particular importance to correct terminology. What should I name this class that prepares the transactions? I am thinking TransactionSomething. Example TransactionBuilder, TransactionFactory etc. But I don't think these names are correct.      For the record, I use .Net but I don't think the framework should have an impact on this.


JavaEE server experience matters for a developer?

Lately I am seeing quite a few application development job ads asking for experience with this or that Java EE server. I can understand this if it is for a server administrator, however I find it stupid and ridiculous to ask for some one with a specific server implementation experience when the job is Java software development. The whole idea behind Java EE as I studied in my initial days was for development of standards and to deploy to any platform of choice that including servers, OS, etc. My question is, are the various Java EE application container implementations so vastly different that they can be considered their own career path for development? What kinds of features exist amongst Java application containers that require such specialized skill that I might not want to not consider applicants with otherwise impressive software development qualifications?


Harmful temptations in programming

Just curious, what kinds of temptations in programming turned out to be really harmful in your projects? Like when you really feel the urge to do something and you believe it's going to benefit the project or else you just trick yourself into believing it is, and after a week you realize you haven't solved any _real_ problems but instead created new ones or, in the best case, pleased your inner beast with no visible impact. Personally, I find it very hard to not refactor bad code. I work with a lot of bad legacy code, and it takes some deep breaths to not touch it when I have no tests to prove my refactoring doesn't break anything. Another demon for me in user interface, I can literally spend hours changing UI layout just because I enjoy doing it. Sometimes I tell myself I'm working on usability, but the truth is just I love moving buttons around. **What are your programming demons, and how do you avoid them?**


NLP as a job requirement

When an employer points out that NLP is required in a position what does he expect? Can I teach myself natural language processing theory or must know specific frameworks or what?


What's the best programming language to learn for solving partial differential equations?

I have to create a program that compares two or three different methods (FEM FVM FDM) for solving an easy pde. Is there a program language in which I could do this easily? (i need to operate with vectors/matrix and perform inversions on matrix)


How do you handle supporting Chrome versions?

I'm working on a site for my company which, up until a certain point, was an Internet Explorer-only site for various reasons, mainly that when the site was originally conceived IE had a 90%+ market share so the work to get it working in other browsers just didn't make sense. Now that we live in a more diverse browser economy we're doing the work to get the site working everywhere, and as luck would have it a decent chunk of it just happens to already work. However, one issue we're struggling with is the issue of what to support and what not to support. For starters, non-IE browsers release much more frequently than IE did, and you don't know which versions are still in the wild. There's been basically three versions of IE released in the last decade, and IE6 is still supported until 2014. But there's an update for Firefox every other day, Apple updates Safari more or less annually. And then there's Chrome. Chrome has gone from 0.2 to 9.0 in a little over two years. 7.0.517 was released a month and a half after 6.0.472. There's three different versions out right now, a stable, a beta, and a dev. And the dev version of 9.0.587 was actually released before the latest beta version of 8.0.552. With IE we've had the situation arise where we have to support an old version because the IT department of the company in question does not allow the employees to upgrade. With non-IE browsers I'm thinking we'll adopt the line of "update to the latest or we can't help you" but I'm not sure how effective that is. Also, my company does some amount of artificial limitations. For example we have a product aimed at companies so we don't support "Home" versions of Windows (i.e., XP Home, 7 Home Premium) even though there's no technical reason we couldn't. When my company starts asking "what version or versions of Chrome do we support", how should I answer?


Thread safety IDE warnings

I wonder, would it not be possible for an IDE to detect any shared mutable objects that are used in multiple threads? You could flag types as either `[ThreadSafe]` or `[Immutable]` using attributes in .NET for example, and then those variables would never cause warnings, but any other variable that is used inside of a method invoked via `Thread` would be highlighted as "possibly unsafe" unless all assignments occur inside of a `lock` or something like that. I know it wouldn't be perfect because the compiler simply can't reason about all the possible scenarios (humans barely can), but hints like these would be quite valuable, no? Is this even feasible?


Javascript: Safely upload a client data file

I'm (still) working on a template-based XML editing program. It's a GUI-based XML editor that only allows users to add certain tags and attributes based off the requirements. You can see the current version here for an idea. Now, I'd like to allow users to upload their own data templates, but I'm concerned about potential XSS hacks. Currently, the template file is in Javascript object literal notation, which unsurprisingly is a security nightmare if the user can upload their own. I was thinking of using XML instead, but is there an even better alternative?


I can't draw. How can I make polished applications?

I'm not a graphic designer. I'm pretty bad at drawing anything. I struggle to build things that look even as nice as "sample" applications bundled with development tools; primarily because I don't have squat in the way of art assets. What strategies might I take to mitigate this?


Why are virtual machines required?

Instead of compiling the source code for the respective OS (on which it is targeted), you compile once and run everywhere. For the sake of this question, I would call it VM (for example, both for Java and .NET). So this the execution of programs becomes something like                ------------       ----      ----     | Executable |  -> | VM | -> | OS |      ------------       ----      ----      It perfectly makes sense, the compiler remain generic for the respective VM. However, the implementation of VM may vary depending on the machine it is going to be installed i.e. (*nix, windows, mac) x (32 bit, 64 bit). My question is, instead of writing VM for respective machines, why isn't the compiler is written for that specific machine? By this, instead of downloading respective VM you download the respective compiler and that compiler will take care of the machine-code+OS for that specific machine. End result, the execution of native code for any machine. Definitely, each source code would need compilation for that specific machine but now a days, the automated systems, scm builds can help us do this thing. Do my reasons of being confused are right or I am missing some bits of technicalities here? Edit: **PORTABILITY** : Yes, it is one reason but is portability a big issue in today's automated systems? how often do we have to worry about the fact that we don't have to compile it for other machines? Having a code compiled for native machine would give much better performance. Take Java for instance, you can't do low level programming on Windows and you have to choose JNI. Take automated systems like TeamCity/Jenkins or others. We could have such an automated system setup where code submitted through version control would result in the executable.


How to get good scenario coverage in performance benchmarks?

If it is relatively easy to get good _code coverage_ from profiling (because profiling tells you which functions are/aren't called, how many times, and with what parameters), how do I get good _performance scenario coverage_ when doing performance benchmarks? How do I even know that there isn't some "performance blackholes" which can't be discovered except when certain test parameters are very near the "blackhole"? For a toy example, a sorting algorithm can be tested with data sets of size `1, 10, 100, 1000, 10000, ...`. An example of non-numerical coverage would be to test the sorting algorithm with `sorted data`, `unsorted data`, or `evil- constructed data intended to expose the worst case`. These scenarios have been exhaustively investigated by the academia in the case of sorting algorithms. How to apply that thinking into other kinds of software systems?


What are the characteristics for a good report generation software for reporting and tracking software benchmarking results?

This is an offshoot question from this answer to a previous question, where http://speed.pypy.org is highlighted as an example having a good presentation. (However, it appears to me that the project doesn't separate the components of execution/tracking/report-generation/web-service, which makes it harder for other people to adopt.) I am interested in both the functional and the UI requirements of such software. I hope to be able to choose an existing one based on the criteria so that I can use it in my project. Right now, the only thing I can think of is that the Execution UI should be similar to a Unit Testing harness, but the Reporting UI should be totally different from the xUnit family of software. Webpages seem to be a better way to navigate through the results. And, along with some minor ideas:   * There should be a tracking component to track performance changes at all levels   * However, the presentation layer should highlight only "relevant" performance changes, that is, performance drops in important areas that are serious enough to require developers' attention. I am also interested in whether any of the advices from Edward Tufte can be applied here.


Correct path towards a Microsoft certification?

So here's my situation - Currently in college and confident, that i want to pursue a career in Microsoft technologies (.NET development more specific). I haven't got any real world experience (as in no experience in paid nor open source projects, just personal applications and school projects) and it's hard to get into any development position, as most if not all ask for years of professional experience. I'm pretty sure going for a certification is the right thing to do, to "seperate myself from rest of the pack", which should help me get into open source projects and paid jobs alike. The question is, which certifications should i choose? I thought about about going for MCTS: .NET Framework 4, Windows Applications ( 70-511 ) and then MCTS: .NET Framework 4, Web Applications ( 70-515 ) Is that even the correct way to do what i'm trying to do ? Should i disband anything related to desktop applications since everything is moving towards web based ? Which way to go after the given certs ? Any input appreciated! L.A.


Are there serious companies that don't use version-control and continuous integration? Why?

A colleague of mine was under the impression that our software department was highly advanced, as we used both a build server with continuous integration, and version control software. This did not match my point of view, as I only know of one company I which made serious software and didn't have either. However, my experience is limited to only a handful of companies. Does anyone know of any real company _(larger than 3 programmers)_ , which is in the software business and doesn't use these tools? If such a company exists, are there any good reason for them not doing so?


How to maintain standard quality of images uploaded by many users?

We're developing a site where individuals (store owners) will be able to take pictures and upload to the site. Our biggest concern is the variance in quality of pictures across the site. The options we are considering are:   1. Minimum image cleaning scripts (including filters, resizing, sharpening, etc.)   2. Approval process for uploaded images   3. Having a team take the photos for them I'd like to see if anyone has had any experience with 1 and 2 above. How effective is 1, and how efficient is 2?


Should semantic breaking changes be tied to syntactic breaking changes?

**Explanation** First let me briefly define how I'm using terms (I might be bending their typical use a little): When I talk about _semantic breaking changes_ , I'm referring to a change in the meaning/behavior of a public API. It may require changes to consumer code, but it isn't immediately obvious, since nothing 'broke'. Changes are only required because the assumptions made about preconditions/behavior are no longer valid. This is in contrast to _syntactic breaking changes_ by which I'm referring to changes in the public API that require the calling code to change the way it calls the API. This kind of breaking change is obvious since it usually results in compile errors which have to be fixed. **Example** Let's say I'm writing a micro-ORM that given a POCO object, a database connection, and a query will map the results into the object for you. The public API, is fairly simple:               Query<T>(connection As IDbConnection, sql As String)      I'm very unlikely to have a syntactic change in how you interact this tool. However, since there is a lot of behavior bound up in that simple statement, I'm very likely to have semantic changes. **Question** Since there's no syntax change, how do I effectively communicate to consumers of my API that there has been a semantic change? Should I always bundle up semantic changes in syntatic changes so there's no question that something has changed? If semantic versioning encompasses semantic as well as syntactic changes, then that goes a long way to solving the issue. But it would still be possible for developers to build against a newer version, not notice any compile errors, assume things will be fine (since they haven't read the docs), and introduce bugs due to semantic changes in my API.


What's the first language that had the 'Unless' conditional/loop built into itself?

What's the first _(oldest)_ language that had the 'Unless' conditional/loop built into itself? Where an example could be               unless (myVar) == if (!myVar)          until (myVar) == while (!myVar)


OpenGL extension vs OpenGL core

I was doubting: I'm writing a cross-platform engine OpenGL C++, I figured out windows forces the developers to access OpenGL features above 1.1 through extensions. Now the thing is, on Linux, I know that I can directly access functions if the version supports it through glext.h and opengl version. The problem is that if on Linux, the core doesn't support it, is it possible there is an extensions that supports the same functionality, in my case vertex buffer objects? I'm doing something like this: Windows:   `#define glFunction functionpointer_to_the_extension` Linux:   Since glext already defined glFunction, I can write in client code glFunction, and compile it both on Windows AND Linux without changing a single line in my client code using the engine (my goal). Now the thing is, I saw a tutorial use only the extension on Linux, and not checking for the opengl implementation version. If the functionality is available in the core, is it also available as extension (VBO's e.g.)? Or is an extension something you never know is available? I want to write an engine that gets all the possibilities on hardware, so I need to check (on Linux) for extensions as well as core version for possible functionality implementation.


When do you say "near ID" / "far ID" when using RTMFP in ActionScript 3?

I've been using RTMFP streaming for around a year in ActionScript 3, and I pretty much know the difference between a near ID and far ID. The near ID is your peer ID, and the far ID is the other guy's peer ID. The problem I'm having is that, to my knowledge, choosing whether to use one term or the other in a given sentence is a little like choosing whether to say "go" or "come". In English, "go" and "come" have opposite meanings, but ironically, they can still be used almost interchangeably. It's because whether you're going or coming is so heavily dependent on perspective, as opposed to anything concrete. Is the choice of words between "near ID" and "far ID" just as ambiguous, or is there some sort of method to the madness? Thanks!


emacs keybindings

I read a lot about vim and emacs and how they make you much more productive, but I didn't know which one to pick. Finally when I decided to teach myself common lisp, the decision was straight forward: everybody says that there's no better editor for common lisp, than emacs + slime. So I started with emacs tutorial and immediately I ran into something that seems very unproductive to me. I'm talking about key bindings for cursor keys:               forward/backward: Ctrl+f, Ctrl+b     up/down: Ctrl+p, Ctrl+n      I find these bindings very strange. I assume that fingers should be on their home rows (am I wrong here?), so to move cursor forward or backward I should use my left index finger and for up and down right pinky and right index fingers. When working with any of Windows IDEs and text editors to navigate text I usually place my right hand in a position so that my thumb is on the right ctrl and my index, ring and middle fingers are on the cursor keys. From this position it is very easy and comfortable to move cursor: I can do one- character moves with my 3 right fingers, or I can press `ctrl` with my right thumb and do word-moves instead. Also I can press `shift` with my left pinky and do single-character or word selections. Also it is a very comfortable position to reach `PgUp`, `PgDn`, `Home`, `End`, `Delete` and `Backspace` keys with my right hand. So I have even more navigation and selection possibilities. I understand that the decision not to use cursor keys is to allow one to use emacs to connect to remote terminal sessions, where these keys are not supported, but I still find the choice of cursor keys very unfortunate. Why not to use `j`, `k`, `i`, `l` instead? This way I could use my right hand without much finger stretching. So how is emacs more productive? What am I doing wrong?


How can I introduce QA and break it into parts for various people?

I was recently asked how to do this, specifically:   1. How to introduce QA into an organization?   2. How to break up QA into parts that others can do ?   3. How to prioritize what needs QA?   4. How to determine what to buy? code? etc. The organization uses Rails on Rails extensively as the development platform Note: I am posting a lengthy answer myself but I will also upvote additional good answers (and probably incorporate them into my answer).