title: Windows OS design decisions

text: I've seen an interview with Richard Stallman some time ago, and he was asked a question about security and Windows OS which he answered saying that there are some relatively bad design decisions that were made when creating the Windows OS. These design decisions (according to R. Stallman) were known at the time for creating security vulnerabilities later on. Can anyone explain what he's talking about ? The video with the interview can be found here http://rt.com/news/richard- stallman-free-software-875/ \- it starts at 8:30.


title: Building a string translation database for multiple (in-house) projects

text: At our company we have an existing translation ms-sql table wich stores strings like this:               Id |     Key     | Language | Value       1 | hello-world |  nl-BE   | Hallo Wereld      2 | hello-world |  en-GB   | Hello World      There are 3 languages in the system and I expect this to grow to a maximum of about 10 in the future This table is read by multiple very different projects (about 60 projects, mostly websites/web applications and some web services), that each open a database connection to the translation database, cache the translations Feedback from the front-end devs is that our UIto input or modify translations 's biggest downside is that they cannot know what project uses what strings. They sometimes modify strings not knowing they are breaking 7 projects with it. Now they just have to type something like `this.Translate("Hello World")` and the system takes care of the rest. I could ofcourse force them to something like `this.Translate("Hello World","AwesomeApplication1")` but that seems like it's going to require quite a lot of refactoring across the many many projects. **How would you go about providing this solution? How would you, as a dev, provide the "project name" to the translation? How would you store this in the database?** Important note: the translation re-use is the whole point of the centralised database, so scoping translations to one project by going               1|hello-world|nl-BE|Hallo Wereld|MyAwesomeApplicatoin1     5|hello-world|nl-BE|Hallo Wereld!|MyAwesomeApplicatoin2      is not really a wanted option. I'd prefer something like :               1|hello-world|nl-BE|Hallo Wereld|MyAwesomeApplicatoin1,MyAwesomeApplicatoin2      or a foreign key equivalent of just putting the names in the table. **UPDATE** Based on the advise to normalize the database I have come up with something like this so far: ![](http://i.stack.imgur.com/UQhQ3.png)               //this allows me to distinquish if translations where added by developer or by translator      **UPDATE2:** added edmx instead of text. If people are interested I could github the WCF project i'm wrapping this concept in so other people can test and use it.


title: Should your best programmers have to check everyone else's code into source control?

text: One of the differences between svn and git is the ability to control access to the repository. It's hard to compare the two because there is a difference of perspective about who should be allowed to commit changes at all! This question is about using git as a centralized repository for a team at a company somewhere. Assume that the members of the team are of varying skill levels, much the way they are at most companies. Git seems to assume that your only your best (most productive, most experienced) programmers are trusted to check in code. If that's the case, you are taking their time away from actually writing code to review other people's code in order to check it in. Does this pay off? I really want to focus this question on what is the best use of your best programmer's time, not on best version-control practices in general. A corollary might be, do good programmers quit if a significant portion of their job is to review other people's code? I think both questions boil down to: is the review worth the productivity hit?


title: Securely Validating Software License

text: I'm currently developing a product (in C#) that will be available for downloading for free but requires a monthly subscription in order to be used after a specific trial period. What i am intending to do is to let the user register an account on our website and charge it with credits in order to use the application. However a couple of problems faced me as a new comer to the licensing field   * How is this logic usually implemented.   * How to connect my C# application to my website's database and grab the data required (is trial expired, if yes does the user have enough credits).   * How to make sure that i am at least 80% (or so) secure from attackers who might start some MATM attack in order to alter the received packets and gain unauthorized access to my program.   * As i already heard. Using SSL may grantee me that my application is connecting to the right address, But how again to make such connection with my basic website. (Wordpress website or VBulletin). Excuse me if my question seems a little broad but i have crawled the internet searching for a specific answer for my needs and found nothing. So i really need an efficient answer (or maybe a conversation) about this :D. Oh and a small declaimer: by saying grabbing `DATA` and so on i am not asking for a way to grab them i am just giving an example of what i want to achieve. For the sake of narrowing up the things i came up with an idea that i want to know more about.   * Can i use `Wordpress` or VBulletin and create and RSA encrypted login to them and let the response be encrypted too ?


title: Is there an existing market for software libraries?

text: Kinda have the impression library development is either done by big companies like Microsoft that give them away for free, or the open-source community. Is there an existing market to _sell_ software libraries?


title: Elegant ways to handle if(if else) else

text: This is a minor niggle, but every time I have to code something like this, the repetition bothers me, but I'm not sure that any of the solutions aren't worse.               if(FileExists(file))     {         contents = OpenFile(file); // <-- prevents inclusion in if         if(SomeTest(contents))         {             DoSomething(contents);         }         else         {             DefaultAction();         }     }     else     {         DefaultAction();     }        * Is there a name for this kind of logic?   * Am I a tad too OCD? I'm open to evil code suggestions, if only for curiosity's sake...


title: Fail-fast design

text: I recently tend to design my methods in the following way:               if ( 'A' === $a ) {         if ( 'B' === $b ) {             return 'some thing';         } else if ( 'C' === $c ) {             return 'some other things';         }     }          /* If you made it up to here, then something has gone wrong */     return false;      So basically the idea is to check if the first condition is correct, if it is then continue until you reach the first `return` statement to return the expected result, if not, move on to the next condition and so on. The key is that all the method's functionality has already shrunken down and wrapped up in a conditional statement piece by piece, so you should meet at least one condition to take a useful action or if you reach the very last line, then it will `return false`, that means none of the expected conditions were met, that in my design it means the input wasn't in a proper or expected format, data-type, range, etc. so the method were not able to continue processing that. I can achieve the same goal in a couple of different ways, but this one seems to be cleaner as I generally need to write code only for _positive_ conditions (I actually don't know how should I call it) -- unless I need to take a specific action if a certain condition haven't met. And in the end I will get `false` if the method wasn't able to accomplish its job -- with real conditions in place most of the time it's almost like a jump to the end of method when you can't pass through an `if` statement. It's actually designed in a way that you will either pass this `if` and will heading to the either next `if` or a `return` statement or you are very unlikely to match any other `if` statements and will jump directly to the last `return false` statement. Now, my questions are:   1. Is it a (true) fail-fast design, which in this case is only looking for the proper condition to continue and is willing to fail as soon as one fails. Is that correct or am I mixing up things here? If not, is there any specific term for that?   2. Also as I recently generalized this approach for all the new methods I create, I wish to know if there is any drawback or design flaw here that might bite me back later.


title: Keep indentation level low

text: I hear a lot that you should not write functions larger than one screen size, that you should extract things into functions if you call things very often and all these coding guidelines. One of them is also keep your indentation level low. Some people told me even I should max indent 4 times. But in every day programming it keeps happening that I need O(n^2) or O(n^3) loops with some flow control, which creates out of nowhere 7 or 8 layers of indentation... Are there any good ways to avoid that? One problem is, if you try to avoid complex if/else statement nesting I tend to do this in one row which can look very terrible and be unreadable and not very easy to maintain.


title: What is the Best Style for Functions with Multiple Returns and If/Else Statements?

text: > **Possible Duplicate:**   >  Elegant ways to handle if(if else) else In a function where there are multiple returns, what is the best style to use? This style, where there is no 'else' because it is frivolous and you think it is more concise?               f() {         if (condition) {             return value;         }              return other_value;     }      Or this, if you think that 'else' provides nice syntax sugar to make it more readable?               f() {         if (condition) {             return value;         } else {             return other_value;         }     }      Feel free to share whatever other reasons you may have for preferring one over another. EDIT: The above samples are hypothetical, if they were this simple, as Yannis Rizos noted below, the ternary operator ( condition ? value : other ) would be acceptable. However I'm also interested in cases like this:               f() {         if (condition1) {             return value;         } else if (condition2) {             return value2;         }         ...         else {             return other_value;         }     }


title: Licensing approach for .NET library that might be used desktop / web-service / cloud environment

text: I am looking for advice how to _architect_ licensing for a .NET library. I am not asking for tool/service recommendations or something like that. My library can be used in a regular desktop application, in an ASP.NET solution. And now Azure services come into play. Currently, for desktop applications the library checks if the application and company names from the version history are the same as the names the key was generated for. In other cases the library compares hardware IDs. Now there are problems:   * an Azure-enabled web-application can be run on different hardware each time (AFAIK)   * sometimes the hardware ID for the same hardware changes unexpectedly   * checking the hardware ID or version info might not be allowed in some circumstances (shared hosting for example) So, I am thinking about what approach I can take to architect a licensing scheme that:   * is friendly to customers (I do not try to fight piracy, but I do want to warn the customer if he uses the library on more servers than he paid for)   * can be used when there is no internet connection   * can be used on shared hosting What would you recommend?


title: Not assigning Bugs to a specific user

text: My question: Is there a benefit to NOT assigning a Bug to a particular developer? Leaving it to the team as-a-whole? Our department has decided to be more Agile by not assigning Bugs/Defects to individuals. Using Team Foundation Server 2012, we'll place all Bugs in a development team's "Area" but leave the "Assigned To" field blank. The idea is that the team will create a Task work item which will be assigned to an individual and the Task will link to the Bug. The Team as a whole will therefore take responsibility for the Bug, not an individual, aligning to Scrum - apparently. I see the down side. The reporting tools built into TFS become less useful when you cannot sort by assigned vs unassigned, let alone sorting by which user Bugs are assigned. Is there a benefit I'm not seeing? Besides encouraging teamwork by putting the responsibility on the team-as-a-whole instead of an individual?


title: Confusion about inheritance

text: I know I might get downvoted for this, but I'm really curious. I was taught that inheritance is a very powerful polymorphism tool, but I can't seem to use it well in real cases. So far, I can only use inheritance when the base class is an abstract class. Examples :   1. If we're talking about `Product` and `Inventory`, I quickly assumed that a `Product` **is an** `Inventory` because a `Product` must be inventorized as well. But a problem occured when user wanted to sell their `Inventory` item. It just doesn't seem to be right to change an `Inventory` object to it's subtype (`Product`), it's almost like trying to convert a parent to it's child.   2. Another case is `Customer` and `Member`. It is logical (at least for me) to think that a `Member` **is a** `Customer` with some more privileges. Same problem occurred when user wanted to upgrade an existing `Customer` to become a `Member`.   3. A very trivial case is the `Employee` case. Where `Manager`, `Clerk`, etc can be derived from `Employee`. Still, the same upgrading issue. I tried to use composition instead for some cases, but I really wanted to know if I'm missing something for inheritance solution here. My composition solution for those cases :   1. Create a reference of `Inventory` inside a `Product`. Here I'm making an assumption about that `Product` and `Inventory` is talking in a different context. While `Product` is in the context of sales (price, volume, discount, etc), `Inventory` is in the context of physical management (stock, movement, etc).   2. Make a reference of `Membership` instead inside `Customer` class instead of previous inheritance solution. Therefor upgrading a `Customer` is only about instantiating the `Customer`'s `Membership` property.   3. This example is keep being taught in basic programming classes, but I think it's more proper to have those `Manager`, `Clerk`, etc derived from an abstract `Role` class and make it a property in `Employee`. I found it difficult to find an example of a concrete class deriving from another concrete class. Is there any inheritance solution in which I can solve those cases? Being new in this OOP thing, I really really need a guidance. Thanks!


title: Writing generic code when your target is a C compiler

text: I need to write some algorithms for a PIC micro controller. AFAIK, the official tools support either assembler or a subset of C. My goal is to write the algorithms in a generic and reusable way without losing any runtime or memory performance. And if possible, I would like to do this without increasing the development time much and compromising the readability and maintainability much either. What I mean by generic and reusable is that I don't want to commit to types, array sizes, number of bits in a bit field etc. All these specifications, IMHO, point to C++ templates, but there's no compiler for it for my target. C macro metaprogramming is another option, but, again my opinion, that greatly reduces readability and increases development time. I believe what I'm looking for is a decent C++ to C translator, but I'd like to hear anything else that satisfies the above requirements. Maybe a translator from another high-level language to C that produces very efficient code, maybe something else. Please note that I have nothing against C, I just wish templates were available in it.


title: OOP PHP make separate classes or one

text: I'm studying OOP PHP and working on a small personal project but I have hard time grasping some concepts. Let's say I have a list of items, each item belongs to subcategory, and each subcategory belongs to category. So should I make separate classes for category (with methods to list all categories, add new category, delete category), class for subcategories and class for items? Or should I make creating, listing and deleting categories as methods for item class? Both category and subcategory are very simple and basically consist of ID, Name and parentID (for subcategory).


title: Never written much unit tests, how can I practice more of it?

text: I have an interview coming up soon next week and there's a few things on their list of responsibilties for this software development job (the job position title is vague, it says java developer) that I am worried about:   * Unit test features   * Debug new features   * Provide recommendation on test case design (what is this?) I am worried because in my past software projects, I have not bothered writing unit tests. I know how to use JUnit to write tests in Eclipse and the process but it's just that I have not much experience writing tests. For example, I rely on data from the web, which varies a lot from each other, and process this data. How can I write test cases for every single type of data? Also, if the data is from a local database, how would I write a test case that checks that data from tables are being read properly? I've used the debug feature in Eclipse whenever I could, but sometimes, when I am accessing a library which doesn't come ith source code for (e.g. commercial 3rd party Jars), the step into feature would stop. So for most cases, I just System.out.println to discover where the bug is happening. Is there a better method? How can I practice in the short period of time to be somewhat competent in writing unit test?


title: Is it common to have stored procedures disabled on MySQL managed hosting plans?

text: I'm building an app that I think would benefit from the use of MySQL stored procedures. I know stored procedures have a bad reputation, but I think they suit my application well. Using stored procedures would reduce the number of queries per request significantly (mostly inserts), as well as allow me to leverage the procedures across multiple implementations of this software. I think the software will benefit. My concern however, is that pushing functionality into stored procedures may make it harder for users to deploy the software on shared hosting services. Is it common practice to expect users to have stored procedure capability (i.e. allow scripts to create and run stored procedures)? **Edit:** This application is intended for my end user to deploy on her own.


title: JSP, EL, JSTL: learning from a web designer perpective

text: I have two books geared toward learning JSP. From what I've read, one motivating feature/benefit is that it is easier for web designers (they apparently don't, as a rule, know Java) to work with dynamic pages via EL/JSTL. From what I've seen so far, learning EL/JSTL requires a basic understanding of Java. I have yet to see an example that doesn't have a Java class to reference. Since that is what I've seen, I wonder if someone can tell me that this is true or not. To make the question clear: Do web designers have to get a grasp, on a very basic level, of how a Java class works (e.g. fields, setters, getters, args, constructors...)? This question is really meant to help me decide whether or not to ask another question; it is a qualifier.


title: Empirical Evidence of Popularity of Git and Mercurial

text: It's 2012! Mercurial and Git are both still strong. I understand the trade-offs of both. I also understand everyone has some sort of preference for one or the other. That's fine. I'm looking for some information on level of usage of both. For example, on stackoverflow.com, searching for Git gets you 12000 hits, Mercurial gets you 3000. Google Trends says it's 1.9:1.0 for Git. What other empirical information is available to estimate the relative usage of both tools?


title: How the Erlang get soft-realtime with GC?

text: Generally GC is not a good choice to get a soft real-time attribute. But Erlang is GC based language can be soft real-time. Does it mean Erlang have almost no GC latency? How does it work?


title: Style for creating IEnumerable unions

text: There isn't any cool LINQ sugar for creating unions. The `Enumerable.Union()` method is usually called like this:               var bigList = list1.Union(list2);      The alternative is to call `Enumerable.Union()` which can be more readable:               var bigList = Enumerable.Union(list1, list2);      However neither of these methods are very stylish (more importantly, readable) when scaling out The following is probably the best method:               var reallyBigList = list1.Union(list2).Union(list3);      Which can result in some messy method chaining. Alternatives need incidental variables:               var list1and2 = list1.Union(list2);     var reallyBigList = list1and2.Union(list3);      or               var list1and2 = Enumerable.Union(list1, list2);     var reallyBigList = Enumerable.Union(list1and2, list2);      Is there a clean way of setting up these more complex unions? Would an extension like `Enumerable.Union(params IEnumerable<T> collections)` (used like `var reallyBigList = Enumerable.Union(list1, list2, list3)`) be better?


title: Separating the database, API, and the interface

text: Most of my projects start small. Many times I start with a web page (1 file) that has the code to... select stuff from the database => display it to the user and offer editing => receive the edits (sometimes complex enough that it requires parsing) => update the database all of this in 1 file, of course. As the project grows it always becomes annoying to have so much code in one pile, 50 `if` statements. **Question** : What is a good, proven & intuitive data separation? I guess i'm looking for a diagram that explains which code goes in what file. I would like to keep this language independent, but in case it matters I'm using PHP and MySQL.


title: What are some math concepts to review for an interview?

text: What are some good math concepts to review for a software engineering interview? The position is not expected to be particularly math heavy, i.e graphics programming, but I imagine refreshing on some math concepts would help going into an interview for a high caliber company. The more specific the better. Thanks in advance!


title: Can I redistribute simplified BSD code?

text: Here is a plugin I wish to redistribute: http://plugins.jquery.com/project/TextAreaResizer I've written a Jquery plugin that needs the text resizer as a prerequisite. The license type says:               License type: Simplified BSD License/FreeBSD License      I did a bit of googling and it said you have to retain all license info, but this plugin doesn't come with any! Can I package a modified version of this (I changed one number in the source) and distribute it with my plugin? Thanks for any insight


title: How should I plan out my code base?

text: I'm currently working on a project that's about to reach over 5,000 lines of code, but I never really completely thought out the design. What methods should I use to structure and organize my code? Paper and pen? UML diagrams? Something else?


title: Reference website for CSS 3 properties (like box-reflect)

text: Today, I started reading the book _CSS Mastery 2nd edition_. It is really a good book for anyone who is interested in learning some techniques. On page 151, I discovered the `box-reflect` property from CSS3. I tried to find out more information about which browser suports it and the syntax of the property, but I only found a site that didn't explain much. Can anyone please provide me with a link to a website that is up to date regarding the CSS3 elements? The site should also contain information about browser-support for the different elements. I'm primarily interested in the `box-reflect` property and to update my knowledge of CSS3 properties.


title: Functional programming language for web development

text: I want to choose to learn a functional programming language, it should fulfill the criteria:   1. Open source, static typed & fully object-oriented too.   2. Must has web framework because it's for web development.   3. I want to avoid oracle jvm altogether, therefore not scala, clojure.   4. Should be rather popular, i.e. has real-world applications in industry. Please recommend which good language I can use? thanks.


title: Is it possible to combine programming languages?

text: I've been programming for a while, I've written some rudimentary programs, and I want to keep learning. I've reached that point where you just don't know what to learn next, and I'd like to ask a question for my own curiosity. The question, in a nutshell, is if you can combine multiple programming languages into 1 result? For example, can this code be possible?               <html>     cout << "Hello world!";     </html>      or               import java.util.Scanner;     cout << "Insert a number from 1 to 10";     Scanner n = new Scanner(System.in);     System.out.println("The value you entered was" +n.newLine());      This feels like a silly question but I can't possible know if it's possible or not, so that's why I'm asking it. In this question I notice he is using Python code in html code, if my above example is not possible, what did he do?


title: What is "short-circuiting" in C?

text: I have heard of the term "short-circuiting" being used in C. What does this mean and in what scenario would it be used?


title: How to remove data redundancy in a table?

text: F1  F2  F3  C1  C2  C3     ------------------------------------------------     A   B   C   1            D   E   F   2            A   B   C       3        D   E   F       4        A   B   C           5     D   E   F           6      i have a table like this. i need my table to be free from Data redundancy like this               F1  F2  F3  C1  C2  C3     -----------------------     A   B   C   1   3   5     D   E   F   2   4   6      i am unable to figure out the optimized logic. can someone help me out.?


title: data stored in dbase (application result dd.mm.yyyy)

text: I have a .dbf file (dbase) with data of type "date" to read directly via php. I have the application result (format: dd.mm.yyyy) and the stored hex code. I can't interpret the hex data to get the same results or similar results to the application. Which alogrithm is used to get this results? Examples:               app.result=database.hex;     01.01.1000=17 3C 68;     02.01.1000=17 3C 69;     01.02.1000=17 3D 08;     01.01.2000=2E 7C 50;     01.01.1903=2C 58 6F;      Can anybody help me?


title: License that grants the initial author all rights of derived/modified work?

text: _Please note that I do not want to argue about the moral aspect of this question. I know that there are probably many different concerns._ I have been researching for a special license that could be used in a following scenario, but with no success: Let's assume I have a software and want to release its source code, so that others can use it too. Since I don't want others to make changes and keep them closed I could the GPL. But here's the thing: Even if I profit from changes that other people do. I can relicense only my code because I'm not holding the copyrigth any code that not made by me. But I would like to. I want to know if there is a ready-to-use license that will grant me (the initial author) the rigth to relicense any changes or code that was added by others. Or in even shorter terms: A GPL that does not count for me. If you are interessted why I need this: I don't know if I will ever use my software for a commercial product. Probably not, but if I just use the GPL, I migth end up in a situation where I can't remove any other code since there are to many committers.


title: Are certifications worth it?

text: I am finishing my college degree in programming soon and I'm exploring the next steps to take to further my career. One option I've been considering is getting a certification or a series of certifications in the area of development I want to work in. Are these certifications worth the time and money? Do employers place a lot of value in them?


title: Are certification courses worth it?

text: I'm planning on getting certification in Database Development for SQL Server (MSTC - 70-433). I'm a junior level report writer at a new job and the company is offering to pay the majority, if not all, of training course fees. The course is five days. I noticed that MS has a self-paced training kit (book) that I could use. I'm wondering if this would be a better option because it will allow me to go as quick as possible. I've also heard about video training sessions (Lynda.com) but they seem to go at slow pace. My questions are:   1. What should I expect at a certification course? Is it hands-on training? Small classes with personal feedback or not?   2. Would I be better off learning at my own pace using the training kit? (I'd rather this not turn into a certifications are pointless discussion..)


title: Would a programming certificate teach me anything?

text: I'm 16-years old, and due to being placed in accelerated programs during my whole academic career, I just finished high school over the holiday season. For the past year or so I've been teaching myself web development (front-end, more specifically), and want to go into a career in the field. I have a front- end internship all lined up for the summer (some places don't offer them year- round, I guess), but I want to continue learning between these two periods. More specifically, I want to learn some server-side development so I can understand the interconnection between the front-end and back-end better. My question is, would taking on a programming certification program at my local community college teach me anything, or is the information too outdated to be relevant whatsoever? PHP is the server-side language covered in the certificate (it also covers JS and CSS). I feel like in self-teaching myself I may have skipped over some fundamentals of JavaScript, and I'd really like to have a solid understanding of the language from both a syntax and philosophical perspective (i.e. understanding advantages, distadvantages, etc). Edit: I've been building a portfolio, and am considering skipping going for a degree altogether. I just want to do this for self-improvement.


title: Programming certificates

text: > **Possible Duplicate:**   >  Are certifications worth it? I'd be glad to hear your opinions on which programming certificates are the most widely recongnized in the industry and how useful are they actually. I've googled a lot this question but I've never asked here and I'd like to gather as many opinions as possible before applying for any. I'm interested mainly in developing business application. I have knowledge in Java, SQL, PHP, some C#. Thank you in advance!


title: What are other certifications beside cisco and Microsoft , which put some weight in resume

text: > **Possible Duplicate:**   >  Are certifications worth it? I want to know which are those certifications which can help in increasing job chnaces more. Although experience is more important than certifications but if there is tie on experience then certifications can matter


title: Do Microsoft Certifications matter?

text: > **Possible Duplicate:**   >  Are certifications worth it? I'm curious what experience others have had, both from the perspective of an employer and an employee on Microsoft Certifications. I'm kind of sitting on the fence myself on this issue. I tend to have a cynical view of folks with massive amounts of letters following their name, and sometimes think that these certificates are so specialized that they prove a candidate knows "almost everything about almost nothing". Deeply specialized knowledge isn't always needed in the real world, especially if it means total ignorance of related subjects. Nobody needs to here "That's not my specialty - we need to hire another guy on the team" very often. On the other hand, everybody knows how easy it is to BS through an interview, and nobody wants the experience of hiring an employee and finding out two weeks later that they don't really have a good grasp on what you need them to do.


title: Java Certifications process: Good or Bad idea

text: > **Possible Duplicate:**   >  Are certifications worth it? I am looking to get into more Java Development after being thrown on a project that required Java development for a month and successfully knocking it out. I still feel as though I could use a little bit more refinement with Java and I thought certifications might be the way to go. I would like to be certified in JPA, Java Web services, and Java Front end development (probably JSF or Spring MVC or something like that). I would like to be an architect at some point as well. I have a couple of questions about what is the best way to go about getting certified. My first question is regarding the Java Certification process itself: 1) Is there a baseline certification that I would need to get before I go out and get certified in JPA , Web Services, Front End development, and Architect certification? 2) Do you think that certification is even a good idea? Do you know of employers that would give someone a leg up if say, he has only worked on one or two Java EE projects but has a certification or two? 3) Is this a good step in terms of career development? Is focusing just on development limiting my self to the basement of some development firms? How can I make myself more valuable as a business asset? Any other thoughts you guys have on certifications and their business worth?


title: How valuable are master level language certifications like C++ grandmaster?

text: My understanding of standard programming/computer certifications is that they show you have some core competency about a specific language or technology. There seems to be a little room for variation here, but for the most part I don't feel like I don't see very many "expert" level certifications. How valuable are master level language certifications such as the recent C++ Grandmaster? Do you think they would have a big impact on getting a good job? (I understand that C++ grandmaster is a really extreme, maybe unrealistic, example.) If so, what valuable "master" or "expert" level certifications exist for specific programming languages? Are certifications more valuable for showing core competency or specific specialty knowledge? I am not very knowledgable about this subject so let me know if I made bad assumptions.


title: Is an SEI certificate worth anything?

text: I'm talking about SEI Software Architecture Professional Certificate. I've been web developing for 3 years and I'd like to move into Software Architecture. My work will probably pay the fees for this program if I ask nicely enough. But does the SEI have the reputation to make this "certificate" worth having? More importantly, is the training any good? Has anyone done this?


title: What are the certifications to be need for the Java Architect?

text: I'm the senior software developer working in a private company. I want to became the Software Architect in the Java side. Could you please tell me the certifications releated to my scenario?


title: Should I focus on getting certified?

text: I am a graduate in computing and I am on the job hunt at the moment. So I now have an MSc and a Bsc qualification in applied computing. People have been saying get a professional qualification right away while others have said "not now". I am really unsure what to think of them at the moment, someone said to me they are bad as it makes you look like you are not open to developing in other environments. For example, if I was to get a MS certification employers might think I am useless outside of a Microsoft environment. Are certifications worth the money? Should I really get them now, so soon after I graduate or wait till I have some experience in the working world?


title: Is the CakePHP certification worth it?

text: I have over 5 years of experience in web technologies—primarily the LAMP stack—and over 2 years in the CakePHP framework. I am considering the CakePHP certification, is it worth it?


title: If you're a .NET developer, does getting the Microsoft Certified Master SQL Server 2008 cert make sense?

text: So I've been working at a job for the past year as a .NET developer/DBA. The job is my first DBA job. Traditionally, I'm a .NET developer and have about 5 years experience in it. Does it make sense for me to continue my certs to get the MCM (assuming I'm eligible)? I'm thinking it doesn't because I've been working with SQL Server for 5 years but only as a DBA for a year. Would it help a developer to have that? Or is it useful only in switching? I became interested in SQL Server because I felt that during the recession, people were looking more and more for developers who could add value across the stack. Now, I'm not so sure...


title: Is cloudera hadoop certification worth the investment

text: I am considering investing time to learn Hadoop and it's related technologies. The problem is that my current day job will not be using Hadoop any time soon and even if I learn from books, blogs personal projects I will not have much to backup when I actually need to show that I have Hadoop experience. So while continuing my job I would like to invest into my own training and I am thinking about Hadoop certification from cloudera. What do you think about it? Please answer from your perspective (if you took the certification and training course or are in the market for hiring new hadoop developers and what do you look for) I am sure that there is no shortcut to becoming an expert in Hadoop, but certification and training seems like a jump start.


title: Thoughts on Agile / Scrum Certifications - Worth it?

text: For those involved with the Agile community (either as developers or management) you've all probably heard about the Certified ScrumMaster designation as well as Certified Product Owner, and Certified Scrum Developer. You may have also heard about PMI (Project Management Institute) new "Agile Certification." Isn't Agile (as a philosophy) all about opening up to newer and (possibly) more effective methods of developing? Does there need to be a certification to back up the "skills?" What is the best reason to get an Agile certification?


title: Fundamental Difference between fn() and new fn() in javascript

text: In what all aspects, calling a function with and without new keyword differ in javascript? I mean what all things are differing between? `testFn()` vs `new testFn()`


title: Creating a very basic compiler using Java

text: I want to try and create my own very basic language, with it's very basic compiler. All using Java. For now, it will only need to enable to 'programmer' to print things to the screen. I had an idea for how to do this, and what I wanted to know is: Will this be considered an actual 'compiler', an actual 'language', and an actual 'virtual machine'? (All very, very basic of course). My idea was to create a program which will serve as the 'IDE' (editor and compiler), and another one which will serve as the 'virtual machine'. This means that the IDE will not compile the written code to some existing machine code, like the Java Bytecode, but will actually compile to some kind of compiled code made up by me. This compiled code will only be understandable by my 'virtual machine' program, and will only be able to run inside this program. The 'virtual machine' program, will use high-level Java operations in order to understand and execute the compiled code. The 'virtual machine' program will be a Java program, running on the JVM. My question is: **Conceptually** , is this considered a virtual machine, and 'machine code'? If not, is this still considered a 'programming language', even though it's compiled bytecode can only run inside a specific program?


title: How to practice programming?

text: I've been a PHP developer for 5 years now. Before I started working in that field, I've been practicing at home. I've created my own CMS, so I could actually show some of my code to the potential employer. In the final version, it had about 2,000 lines of code, and no one except me was using it. But that was not the case, because I've learned a lot during this project. Lately I've decided to move forward and abandon web developing for sake of C/C++ programming. I've read a few books recommended on stackoverflow, skimmed over a glibc manual, and solved some problems on Project Eurler as adviced. Now it's time to start some project, but I can't come up with anything. What is the next step I should take?


title: Simulating Agile Software Development

text: Looking for a guide or example of where a group facilitator walks a group through an agile software development cycle playing the role of both the event facilitator and the key stakeholder or project owner.


title: what limitation will we face if each user-perceived character is assigned to one codepoint?

text: Hi all I was wondering what limitations will we have if Unicode had decided to assign one and only one codepoint to every user-perceived character? Currently, Unicode has code-points that correspond to combining characters. Such characters combine with a previous code-point (or sequence thereof) to present to the user what appears to be a single character. From what I can see, the current standard is full of complexities. Even if I try to avoid any kind of complexities by using an encoding like UTF-32, this problem still **persists**. It's not an encoding issue at all. For example, in Unicode when a grapheme cluster is represented internally by a character sequence consisting of base character + accent, then when the user clicks the `>` button to skip to the next user-perceived character, we had to skip from the start of the base character to the end of the last character of the cluster. Why does it need to be so hard? Why can't we assign a single code point to every user perceived character such going to the user-perceived character is simply a matter of reading the next code point? The unicode website seems to acknowledge this complexity, (although I could not understand what exactly is so rare about having to figure out the number of user-perceived character counts in a string): > In those **relatively rare circumstances where programmers need to supply > end users with user-perceived character counts** , the counts should > correspond to the number of segments delimited by grapheme clusters. > Grapheme clusters may also be used in searching and matching Diacritics are also the reason why things don't work as expected. For example, if I throw 2 ピ characters (japanese katakana PI using the unicode representation `U+30d2 U+309a`) into a String builder and reverse it, I would naturally expect the output to be 2 ピ characters (i.e. ピピ), but it gives an invalid output of ゚ピヒ ! **If Unicode had assigned individual code points for each user-perceived character and scrapped the idea of grapheme clusters, this wouldn't have happened at all.** What I would like to know is, what exactly is wrong with representing every user-perceived character as one unicode codepoint? Is it likely that doing so would would exceed U+10FFFF possible code points (if it does exceed U+10FFFF code points I see no reason why they couldn't have set the limit to 2^32 in the first place), Even when there is so much spare space to include the whole family of Elf Languages ? Unicode states: > If you wanted, for example, to give each “instance of a character on paper > throughout history” its own code, you might need trillions or quadrillions > of such codes; But seriously that doesn't make sense at all. Where is the source for making such a claim? A trillion codes is quite an over-statement.


title: New to iPhone Development - iOS5 Storyboard

text: I'm new here and pretty new to iOS development. My question is basically, should I learn the old school development methods or just learn how to do things using the latest tools (i.e. Storyboard)? I've had a go with the Storyboard feature of XCode 4.2 and it's very powerful. My only concern is that it requires iOS 5. I don't mind learning the old way of doing things but I've been having trouble finding tutorials/examples for XCode 4.2 that don't use the storyboard. An example would be the with my trouble finding a good tutorial on how to embed a Navigation Controller into a TabBarController. A lot of the material out there seems to be for older version of XCode. Using the storyboard I'm able to set this up with seconds but still haven't managed to get it working without it. So in short :) would you guys suggest I continue my project using the Storyboard or make the extra effort to do things a little more manually?


title: Certifications for Javascript developers?

text: I'm looking for a solid and but fast paced entry in field of javascript development. The following topics come to my mind:   * Javascript advanced concepts, OOP   * jQuery, jQuery-UI, jQuery-Mobile   * backbone.js   * node.js   * BDD and/or TDD The courses of http://www.codelesson.com seem promising. What certificates for Javascript developers exist/can be recommended? What other vendors can you recommend?


title: Custom heap allocators

text: Most programs can be quite casual about heap allocation, even to the extent that functional programming languages prefer to allocate new objects than modify old ones, and let the garbage collector worry about freeing things. In embedded programming, the silent sector, however, there are many applications where you can't use heap allocation at all, due to memory and hard real-time constraints; the number of objects of each type that will be handled is part of the specification, and everything is statically allocated. Games programming (at least with those games that are ambitious about pushing the hardware) sometimes falls in between: you can use dynamic allocation, but there are enough memory and soft real-time constraints that you can't treat the allocator as a black box, let alone use garbage collection, so you have to use custom allocators. This is one of the reasons C++ is still widely used in the games industry; it lets you do things like http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html What other domains are in that in-between territory? Where, apart from games, are custom allocators heavily used?


title: Is this kind of Design by Contract useless?

text: I've just started informatics university and I'm attending a programming course about C(++). The programming professor prefers to connect every topic with a type of programming design that is similar to Design by Contract. Basically, what he asks us to do is to write every exercise with comments that denote the pre-condition, post-condition, and invariants that should prove the correctness of each program we write. But this doesn't make any sense to me. Maybe writing down your thoughts prevent you from making some mistakes, but if this is all an abstract thing, then if your program intuition is wrong, you'll write your program wrong, and then you'll also write pre and post conditions wrong. In the end, you'll be convinced that a wrong program might actually be correct. I had some programming experience before this course and I found myself comfortably with just writing a program and unit testing it. It takes less time to accomplish and is less "abstract" than just thinking about what every single piece of your program should do in every case (which is kinda like mentally testing it). Finally, determining the pre and post conditions takes me about 80% of the total time of the exercises. It's harder to think about putting down this pre and post correct than to write the program itself. Am I right in thinking that working with pre-conditions, post-conditions, and invariants aren't worth anything? Should I convince myself that this method is right?


title: Architecting a multi-technology solution

text: I am trying to solve an issue with reusing components. I have some UI components (a mix of JS, CSS, and HTML) that are not specific to any application. These UI components need to be able to be used in multiple applications. One is a RoR application, the other is an ASP.NET MVC application. How can I maintain these components (e.g. with version control, distribution) and still make them accessible to the different platforms that need to consume them? For example, ApplicationA and ApplicationB use UIComponentA, which is not natively a part of their projects or repositories, because UIComponentA lives in its own repository. How can these projects get the dependencies they need while keeping the components reusable and hosted in their own location? Does anyone have experience with a similar situation, and if so, how did you tackle it? If you need further information, don't hesitate to ask, I will update this question.


title: When and how should I use exceptions (in Python)?

text: # The Setting I often have trouble determining when and how to use exceptions. Let's consider a simple example: suppose I am scraping a webpage, say "http://www.abevigoda.com/", to determine if Abe Vigoda is still alive. To do this, all we need to do is download the page and look for times that the phrase "Abe Vigoda" appears. We return the first appearance, since that includes Abe's status. Conceptually, it will look like this:               def get_abe_status(url):         # download the page         page = download_page(url)              # get all mentions of Abe Vigoda         hits = page.find_all_mentions("Abe Vigoda")              # parse the first hit for his status         status = parse_abe_status(hits[0])              # he's either alive or dead         return status == "alive"      Where `parse_abe_status(s)` takes a string of the form "Abe Vigoda is _something_ " and returns the " _something_ " part. Before you argue that there are much better and more robust ways of scraping this page for Abe's status, remember that this is just a simple and contrived example used to highlight a common situation I'm in. Now, where can this code encounter problems? Among other errors, some "expected" ones are:   * `download_page` might not be able to download the page, and throws an `IOError`.   * The URL might not point to the right page, or the page is downloaded incorrectly, and so there are no hits. `hits` is the empty list, then.   * The web page has been altered, possibly making our assumptions about the page wrong. Maybe we expect 4 mentions of Abe Vigoda, but now we find 5.   * For some reasons, `hits[0]` might not be a string of the form "Abe Vigoda is _something_ ", and so it cannot be correctly parsed. The first case isn't really a problem for me: an `IOError` is thrown and can be handled by the caller of my function. So let's consider the other cases and how I might handle them. But first, let's assume that we implement `parse_abe_status` in the stupidest way possible:               def parse_abe_status(s):         return s[13:]      Namely, it doesn't do any error checking. Now, on to the options: ## Option 1: Return `None` I can tell the caller that something went wrong by returning `None`:               def get_abe_status(url):         # download the page         page = download_page(url)              # get all mentions of Abe Vigoda         hits = page.find_all_mentions("Abe Vigoda")              if not hits:             return None              # parse the first hit for his status         status = parse_abe_status(hits[0])              # he's either alive or dead         return status == "alive"      If the caller receives `None` from my function, he should assume that there were no mentions of Abe Vigoda, and so _something_ went wrong. But this is pretty vague, right? And it doesn't help the case where `hits[0]` isn't what we thought it was. On the other hand, we can put in some exceptions: ## Option 2: Using Exceptions If `hits` is empty, an `IndexError` will be thrown when we attempt `hits[0]`. But the caller shouldn't be expected to handle an `IndexError` thrown by my function, since he has no idea where that `IndexError` came from; it could have been thrown by `find_all_mentions`, for all he knows. So we'll create a custom exception class to handle this:               class NotFoundError(Exception):         """Throw this when something can't be found on a page."""          def get_abe_status(url):         # download the page         page = download_page(url)              # get all mentions of Abe Vigoda         hits = page.find_all_mentions("Abe Vigoda")              try:             hits[0]         except IndexError:             raise NotFoundError("No mentions found.")              # parse the first hit for his status         status = parse_abe_status(hits[0])              # he's either alive or dead         return status == "alive"      Now what if the page has changed and there are an unexpected number of hits? This isn't catastrophic, as the code may still work, but a caller might want to be _extra_ careful, or he might want to log a warning. So I'll throw a warning:               class NotFoundError(Exception):         """Throw this when something can't be found on a page."""          def get_abe_status(url):         # download the page         page = download_page(url)              # get all mentions of Abe Vigoda         hits = page.find_all_mentions("Abe Vigoda")              try:             hits[0]         except IndexError:             raise NotFoundError("No mentions found.")              # say we expect four hits...         if len(hits) != 4:             raise Warning("An unexpected number of hits.")             logger.warning("An unexpected number of hits.")              # parse the first hit for his status         status = parse_abe_status(hits[0])              # he's either alive or dead         return status == "alive"      Lastly, we might find that `status` isn't either alive or dead. Maybe, for some odd reason, today it turned out to be `comatose`. Then I don't want to return `False`, as that implies that Abe is dead. What should I do here? Throw an exception, probably. But what kind? Should I create a custom exception class?               class NotFoundError(Exception):         """Throw this when something can't be found on a page."""          def get_abe_status(url):         # download the page         page = download_page(url)              # get all mentions of Abe Vigoda         hits = page.find_all_mentions("Abe Vigoda")              try:             hits[0]         except IndexError:             raise NotFoundError("No mentions found.")              # say we expect four hits...         if len(hits) != 4:             raise Warning("An unexpected number of hits.")             logger.warning("An unexpected number of hits.")              # parse the first hit for his status         status = parse_abe_status(hits[0])              if status not in ['alive', 'dead']:             raise SomeTypeOfError("Status is an unexpected value.")              # he's either alive or dead         return status == "alive"      ## Option 3: Somewhere in between I think that the second method, with exceptions, is preferable, but I'm not sure if I'm using exceptions correctly within it. I'm curious to see how more experienced programmers would handle this.


title: Statistical Software Quality Control References

text: I'm looking for references about hypothesis testing in software management. For example, we might wonder whether "crunch time" leads to an increase in defect rate - this is a surprisingly difficult thing to do. There are many questions on how to measure quality - this isn't what I'm asking. And there are books like Kan which discuss various quality metrics and their utilities. I'm not asking this either. I want to know how one applies these metrics to make decisions. E.g. suppose we decide to go with critical errors / KLOC. One of the problems we'll have to deal with with that this is not a normally distributed data set (almost all patches have zero critical errors). And further, it's not clear that we really want to examine the difference in means. So what should our alternative hypothesis be? (Note: Based on previous questions, my guess is that I'll get a lot of answers telling me that this is a bad idea. That's fine, but I'd request that it's based on published data, instead of your own experience.)


title: What does the implementation of .NET string.Split(char[], StringSplitOptions) look like from inside?

text: That is if we were to see how Microsoft wrote this method what would it look like? I'm mainly interested in the use of the StringSplitOptions enumeration with the other parameter and how they probably structured their code to account for each option.


title: Has anyone thoroughly compared C# common coding standards?

text: Most of the C# programmers I know embrace one of the common coding standards. However being aware of the standards is one thing, telling the differences is another. Browsing the common coding standards documents our there on C#, my first reaction was it's more of the same. Admittedly I didn't bother reading everything. Has anyone ever compared them and point out the **major** differences between them?   * **Microsoft's Design Guidelines for Developing Class Libraries**   * **The IDesign C# Coding Standard, development guidelines, and best practices**   * **Lance Hunt's C# Coding Standards**


title: Good industry qualifications to aim for as a grad?

text: I am a fairly recent grad and have been working for over a year now in software development. I would like to get a couple of professionally recognised exams on my CV. I am currently looking at Oracle certified java programmer. But are there any others that would look good and people would recommend?


title: "PHP: Good Parts"-ish book / reference

text: Before I had my first proper contact with Javascript I read an excellent book "Javascript: The Good Parts" by Douglas Crockford. I was hoping for something similar in case of PHP. My first thought was this book: "PHP: The Good Parts" from O'Reilly However after I read the reviews it seems it totally misses the point. I am looking for a resource that would:   * concentrate on known shortcommings of PHP,   * give concrete examples,   * be as exhaustive as possible I already see that things can go wrong. **Research:** I looked through SO, and Programmers for materials. I obviously found this question: http://stackoverflow.com/questions/90924/what-is-the-best-php-programming-book It's general, mine is specific. Moreover I'm reading the top recommendation "PHP Objects, Patterns, and Practice" right now. I find it insufficient -- it doesn't address the bad practices as much as I would like it to. **Motivation:** I don't _dislike_ PHP. I'm not even competent enough just yet to really state that. In 3 months however, I will start a job that will likely involve a lot of development in that language. I do not really know what quality the code will be. I also don't want to be the guy to introduce all the bad practices and then learn everything the hard way. I try to find out about as many traps that I possibly can. In case of Javascript Crockford's lectures really served as a guiding light. I would never feel confident in Javascript without them.


title: Hidden web standards behind Google "custom searchEngines"?

text: Today while playing with Google Chrome Omnibox, I notice a strange behavior. I guess there's some "hidden" web standard behind it, but can't figure it out. Here's how to reproduce:   1. Go to http://edition.cnn.com/   2. Use the search function at the higher right corner, Search a random keyword, for example: "abc"   3. Close the tabs.   4. Open a new tab, type until Chrome reminds you about http://edition.cnn.com/, then press "Tab"   5. The Omnibox now shows "Search CNN.com"! And when you type "abc" and press Enter, it uses the CNN search function to do the job, not Google! I also tried it for several different sites. To some it won't work. But to some sites, like CNN, vnexpress.net, it works after I use the search function of that site once. I also learnt about `chrome://settings/searchEngines` (type it in your chrome box and you will see), and learnt about you can add custom search engine in chrome. But the question is, why Chrome can realize the search URL automatically to some pages, and not others? It's not because some site subscribe to Google service, because I can do the same method for my site (http://ledohoanglong.wordpress.com), and I'm sure that there's no subscription. So I guess there's a method to "expose" the search function of a site, so that Google Chrome can catch it (after I call the search function of that site once, of courses). Does anyone know about how it works behind the scene?


title: Assembly in a research paper

text: I am doing a research paper on programming, and I need to somehow explain assembly... I've never learned the language, but I understand what it is used for and kinda what it looks like...               MOV A,47     ADD A,B     HALT      And from what I understand, it is used for writing some compilers, small bits of code that need to be really fast, and other tasks... But this is kind of a question for people who have used/studied assembly and understand it fairly well. And no, I'm not asking for you to type up this segment of the research paper for me. That would be selfish. I just need a brief explanation, clarification on the subject (I'm just unsure if what I know is true or not) and a pointer in the right direction. For a research paper (I need to explain this VERY simply...) what is purpose of using Assembly in today's society? Of course it was important back in the day but now with all the high level languages, when is this low level language used?


title: Why is the game industry, specifically , so harsh on programmers?

text: On hackernews and /r/programming I've heard several reports of how the games industry is incredibly harsh on programmers. Someone on this site also linked this blog post in an answer I read recently. According to various reports, programmers in the games industry are severely overworked. Perhaps not when working for small games companies, but definitely when working for places like EA(the place discussed in the blog post). So my question is, why? I'm a developer for a large networking company, I sometimes work more than 8 hours a day, but I wouldn't dream of working 12 hour days 6 days a week like the blog post describes. I'd quit and move on without a second thought. Why does the games industry, specifically, have this problem?


title: What's the point of camel-case-navigation?

text: I heavily use CTRL+ to jump between tokens in code (the `_`s are the navigation points):               _fooBar _+ _barFoo_;      Some editors, like the one in the current version of QtCreator, have (by default or optionally) camel case navigation, which goes like this:               _foo_Bar _+ _bar_Foo_;      What is the rationale behind this? I remember some people back in school saying "cool" and "fancy", but is that the whole story? I do not think it is cool, I find it very annoying actually.


title: Differences between Design by Contract and Defensive Programming

text: Could Designing by Contract (DbC) be a way to program defensively? Is one way of programming better in some cases than the other?


title: Do CDNs (such as MSFT and Google) act on the referrer header sent by clients?

text: Will my site be automatically indexed, or search ranking affected based on my use (or non use) of the Google/MSFT CDN? My clients will be sending them the referrer header which I may or may not want included in search results.


title: Spring MVC vs raw servlets and template engine?

text: > **Possible Duplicate:**   >  Why not Spring framework? I've read numerous articles about the Spring MVC framework, and I still can't see the benefits of using it. It looks like writing even a simple application with it requires creating a big hodgepodge of XML files and annotations and other reams of code to conform to what the framework wants, a whole bunch of moving parts to accomplish a simple single task. Any time I look at a Spring example, I can see how I can write something with the same functionality using a simple servlet and template engine (e.g. FreeMarker, StringTemplate), in half the lines of code and little or no XML files and other artifacts. Just grab the data from the session and request, call the application domain objects if necessary, pass the results to the template engine to generate the resulting web page, done. What am I missing? Can you describe even one example of something that is actually made simpler with Spring than using a combination of raw servlets with a template engine? Or is Spring MVC just one of those overly complicated things that people use only because their boss tells them to use it? **EDIT** : A summarized concrete description would be helpful. For example, "I used Spring MVC to build an application that did XYZ, and its feature Q saved me from having to do the extra work of A and B and C which would have been necessary with raw servlets and a template engine." Simply mentioning marketing buzzwords like "dependency injection" doesn't clarify anything.


title: Best ways to sell management on the benefits of Open Source Software?

text: I have worked in a few places where the use of Open Source Software in products they produce is strictly forbidden for various reasons, such as:   * no formal support   * lack of trust in something perceived as "just downloaded from the internet"   * How can it be professional if it's not supported, we don't pay for it etc etc I'm looking for the best ways to convince/prove to management that things won't fall apart should we use these tools.


title: What is the best way to evaluate new programmers?

text: What is the best way to evaluate the best candidates to get a new job (talking merely in terms of programming skills)? In my company we have had a lot of bad experiences with people who have good grades but do not have real programming skills. Their skills are merely like code monkeys, without the ability to analyze the problems and find solutions. More things that I have to note:   * The education system in my country sucks--really sucks. The people that are good in this kind of job are good because they have talent for it or really try to learn on their own.   * The university / graduate /post-grad degree doesn't mean necessarily that you know exactly how to do the things.   * Certifications also mean nothing here because the people in charge of the certification course also don't have skills (or are in low paying jobs). We need really to get the good candidates that are flexible and don't have mechanical thinking (because this type of people by experience have a low performance). We are in a government institution and the people that are candidates don't necessarily come from outside, but we have the possibility to accept or not any candidates until we find the correct one. I hope I'm not sounding too aggressive in my question; and BTW I'm a programmer myself. _**edit:_** I figured out that asked something really complex here. ~~I will un-toggle "the correct answer" only to let the discussion going fluent, without any bias.~~


title: About languages strongly typed with late binding, do they make sense?

text: I never learnt anything about VB6 (and I dont want to) but I wanted to search for bad things in computer software, so my first though was VB6. So for example, VB6 was strongly typed with late binding. Makes some sense to have a language with that combination? (I dont think so). I want to know reasons of why VB6 was like this! or why is good idea for a lenguage to be like this. Bad things that happend with a lengugage like this? good things?


title: What software is used to write functional and non-functional requirements?

text: Is there any software which can be used to write functional and non-functional requirements? When writing those, it is essential to:   * Store the document in text format to be able to make diffs and minimize the impact on the version control,   * Apply extensive formatting when creating diagrams would be an overkill,   * Use diagrams, preferably stored in text format as well,   * Cross-link the requirements or the appendixes. Currently, I can only think about three editors which _may_ be used, but which are not truly suitable:   1. **A Markdown editor.** Benefits: text only; easy to add formatting. Disadvantage: not powerful enough: one can add images, but not diagrams; formatting is rather limited; no cross-linking (unless adding much HTML markup).   2. **An HTML editor.** Benefits: text only; ability to add diagrams with HTML 5. Advanced formatting is possible. Disadvantages: markup difficult to change by hand, or if WYSIWYG editor is used, markup is often too verbose and low quality; cross-linking limited to manual only.   3. **A document editor such as OpenOffice or Microsoft Word.** Benefits: ability to apply some advanced formatting; excellent automated cross-linking. Disadvantages: binary format, which means no diff and wasted space in version control. What are my other choices? What is actually used in the industry?


title: Do you keep your project code names the same in the source tree?

text: Sometimes when I start working on a project, I just can't think of a good name, or think of a good name that isn't already taken. As a result, I'll end up picking some sort of code name for the project. My question is, how do you handle name changes in your source code once you find a real name for your project? Should you continue to refer to the code name in your source tree, namespaces, binaries, etc?


title: Ways to ensure unique instances of a class?

text: I'm looking for different ways to ensure that each instance of a given class is a uniquely identifiable instance. For example, I have a `Name` class with the field `name`. Once I have a `Name` object with `name` initialised to John Smith I don't want to be able to instantiate a different `Name` object also with the name as John Smith, or if instantiation does take place I want a reference to the orginal object to be passed back rather than a new object. I'm aware that one way of doing this is to have a static factory that holds a `Map` of all the current Name objects and the factory checks that an object with John Smith as the name doesn't already exist before passing back a reference to a `Name` object. Another way I could think of off the top of my head is having a static Map in the `Name` class and when the constructor is called throwing an exception if the value passed in for `name` is already in use in another object, however I'm aware throwing exceptions in a constructor is generally a bad idea. Are there other ways of achieving this?


title: Shell independence in programming groups

text: Our programming environment is dependent upon certain environment variables being set. For example, to use distcc, one needs to define the `DISTCC_HOSTS` environment variable. The way we handle this is forcing each developer to `source` a global `tcshrc` file upon invoking a new shell. The global `tcshrc` file contains statements to set the environment variables up (among other things). However, this is awfully discriminatory as each developer is forced to use `tcsh` since setting an environment variable is different per shell. The most obvious solution to this problem to have corresponding global `bashrc` and `zshrc` files, but that of course becomes cumbersome since now we have to maintain three different files all containing the same logic. Are there any clean solutions to solve this sort of situation?


title: Are 3rd-party controls and MVC anathema?

text: At http://www.codeproject.com/Articles/552846/Why-s-How-s-of-Asp-Net-MVC- Part-1, I read this: "You should not use Asp.Net MVC if you rely on 3rd party vendor controls for of the UI." The author doesn't seem to say why (maybe the explanation is too subtle, or I'm too dense). Thoughts? Is it true? Why would this be?


title: Why don't public web applications use ini files for configuration

text: Almost every public CMS out there uses a .php configuration file for the database settings and so on. For example WordPress automatically creates a .php config file when you install it. Why don't they just use a .ini file? PHP already has parse_ini_file() and I'm sure other languages have similar functions.


title: How to determine the effectiveness of a code review process?

text: We've introduced a code review process within our organisation and it seems to be working well. However, I would like to be able to measure the effectiveness of the process over time, i.e. are we not finding bugs because the code is clean or are people just not picking up on bugs? Currently, we don't have an effective fully-automated test process. We primarily employ manual testing, so we can't rely on defects found at this stage to ensure that the code review process is working. Has anyone come across this issue before or has any thoughts on what works well in measuring code reviews?


title: Why should I prefer composition over inheritance?

text: I always read that composition is to be preferred over inheritance. A blog post on unlike minds, for example, advocates using composition over inheritance, but I can't see how polymorphism is achieved. But I have a feeling that when people say prefer composition, they really mean prefer a combination of composition and interface implementation. How are you going to get polymorphism without inheritance? Here is a concrete example where I use inheritance. How would this be changed to use composition, and what would I gain?               Class Shape     {     string name;     public:     void getName();     virtual void draw()=0;     }          Class Circle: public Shape     {     void draw(/*draw circle*/);     }


title: Declaring a field name starting with underscore

text: Before forming a class in Java or other programming languages that support OOP, should I use underscore (_) in each ( **local** or **private** ) field declaration. More precisely: > private String _customername; Is this a correct declaration?


title: How do I fix an "emergent" bug?

text: I'm writing a PDE solver, and I have a bug that only shows up in very large test cases. That is, with small grids the program gives correct answers, but there's a large amount of unaccounted-for error (I've accounted for roundoff, discretization, and other standard types of error that unavoidably occur) that creeps in when my test cases get into the days-to-finish range. I can't run this in a debugger, that would take weeks. And printing out intermediate results is not particularly useful given that I can't manually inspect the output to see what's wrong. **How can I find and fix this "emergent" bug?**


title: Linking to MIT-Licensed dll

text: I'm currently working on some closed-source proprietary software that makes use of a library ( **SharpAVI** ) distributed with the MIT License. The SharpAVI source _isn't_ being used directly anywhere in my project, only the unchanged .dll provided for download on the codeplex site linked above. The .dll is referenced in one very small distinct project inside a much larger solution (consisting of a single wrapper class around the functionality provided by SharpAVI). I'm particularly concerned about this wording: > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. Does the license need to be included in a file with _my_ code, which is linked to the licensed code by .dll, and includes none of the original source? Would this make my wrapper code an MIT-licensed product (that would seem to go against the non-viral nature of the license)? If my wrapper needs to become licensed under the MIT License, wouldn't that propagate to any other code that references it as well? **How do I properly attribute the license information for a linked MIT- Licensed .dll without releasing my own code under the MIT License?**


title: Why can't C arrays have 0 length?

text: The C11 standard says the arrays, both sized and variable length "shall have a value greater than zero." What is the justification for not allowing a length of 0? Especially for variable length arrays it makes perfect sense to have a size of zero every once and a while. It is also useful for static arrays when their size is from a macro or build configuration option. Interestingly GCC (and clang) provide extensions that allow zero length arrays. Java also allows arrays of length zero.


title: Good resources and tools for modern, heavy JavaScript development?

text: I am interested in doing some projects that involve heavy use of JavaScript. Namely HTML5 based canvas games, potentially using node.js as well. I am interested in learning modern best practices, tools and resources for JavaScript. JavaScript is tough to research because you end up wading through a lot of really outdated material, hailing from the times that "JavaScript" was a four letter word. If you are heavily involved in JavaScript programming...   * What text editor or IDE do you use?   * What unit testing framework do you use?   * Do you use Selenium, or something else?   * What other tools do you use?   * What communities exist that discuss recent advents in JavaScript?   * What books do you read/refer to?   * What blogs do you read?


title: Is there a book for learning Javascript -> DOM -> jQuery?

text: > **Possible Duplicate:**   >  The importance of javascript and the best way to learn it? I would like to learn Javascript, the DOM model and jQuery. I've found many recommendations for books for each subject, but I wonder if there is a single book which teaches the three subjects in order and how they relate to each other. Thanks for any advice.


title: Project Suggestion for computer networks using C#

text: I am looking for suggestion for a project in computer networks using C# as the development tool, as part of a university course I am taking. The project should last about a month, involving two people. I'll be happy to hear any intresting ideas you might have.


title: Ruby on Rails Development: updating model attribute using f.association collection

text: Im currently working on a rails program. It contains many different databases but to keep things simple I have a people, student, and faculty table. A person can be a student or faculty member and there all connected by the person_id. A faculty member advises students so the student is connected to the faculty member by the id of the faculty. To create a student you need to select a major and a faculty member(faculty_id). Being that the student and faculty members are all people.. in my dropdown I had to use               <div>       <%= f.input :faculty_id %>       <%= f.association :person, label: "Advisor", label_method: :to_label ,  value_method: :id, include_blank: false, collection:  Person.where("role_id=?", @role.id)%>          </div>      to limit the people in the drop down to only faculty members. But the issue Im running into now is how would I set the faculty_id attribute of the student with the selected value of the association collection?


title: How can you write tests for Selenium (or similar) which don't fail because of minor or cosmetic changes?

text: I've been spending the last week or so learning selenium and building a series of web tests for a website we're about to launch. it's been great to learn, and I've picked up some xpath and css location techniques. the problem for me though, is seeing little changes break the tests - any change to a div, an id, or some autoid number that helps identify widgets breaks any number of tests - it just seems to be very brittle. so have you written selenium (or other similar) tests, and how do you deal with the brittle nature of the tests (or how do you stop them being brittle), and what sort of tests do you use selenium for?


title: Is OO-programming really as important as hiring companies place it?

text: I am just finishing my masters degree (in computing) and applying for jobs. I've noticed many companies specifically ask for an understanding of object orientation. Popular interview questions are about inheritance, polymorphism, accessors etc. Is OO really that crucial? I even had an interview for a programming job in C and half the interview was OO. In the real world, developing real applications, is object orientation nearly always used? Are key features like polymorphism used A LOT? I think my question comes from one of my weaknesses. Although I know about OO, I don't seem to be able to incorporate it a great deal into my programs.


title: How to get people involved in your project?

text: I have many project ideas and unfortunately all require a team of at least 3-5 developers. I've started a project by myself too many times without reaching the end. The point is to involve people in the project with the hope of giving them a share if the project succeeds. I know that the last point however is the hardest and most complicated one. I’m hoping to get some answers that point me in the right direct.   1. Where do I find people that may be interested in the idea?   2. How do I convince people in my network to put time in new ideas? **Update:** Regarding "projects" I'm referring to projects in which I have initiated during my career as developer. Of course it wouldn’t be serious of me to launch several simultaneous projects and complain about not to be able to deliver them to the end.


title: How can I layout this class to make it easier to use for API developers?

text: I have an application that allows the user to place a string of text into a PDF document. I have three different ways that they can do this:   1. **Use a Form Field.** Then they have four properties to define:      1. Provide field name     2. provide instance of the field     3. provide an X-axis Offset     4. provide a Y-axis Offset    2. **Search for a string of text.** Then they have four properties to define:      1. Provide string of text to search for     2. provide instance of that string of text     3. provide an X-axis Offset     4. provide a Y-axis Offset    3. **Define Page Coordinates.** Then they have three properties to define:      1. Provide page number      2. provide an X-axis Offset     3. provide a Y-axis Offset In my API, I want the object to be setup intuitively so that it is clear they are choose one of the three different methods and then whichever one they choose, they have the options for each. In my old API, all of those options are grouped together as a list of properties like this:               Placement.FormField_FieldName     Placement.FormField_Instance     Placement.SearchText_Text     Placement.SearchText_Instance     Placement.PageCoordinates_PageNumber     Placement.XOffset     Placement.YOffset      I find this to be a little confusing for the developer using the API because you could never use all of the properties together. You would either use **Form Field** like this:               Placement myPlacement = new Placement();     myPlacement.FormField_FieldName = "MyPdfFormFieldName";     myPlacement.FormField_Instance = ;     myPlacement.XOffset = 0;     myPlacement.YOffset = 0;      Or use **Text Search** like this:               Placement myPlacement = new Placement();     myPlacement.SearchText_Text = "My String Of Text";     myPlacement.FormField_Instance = 1;     myPlacement.XOffset = 0;     myPlacement.YOffset = 0;      Or use **Page Coordinates** like this:               Placement myPlacement = new Placement();     myPlacement.PageCoordinates_PageNumber = 1;     myPlacement.XOffset = 0;     myPlacement.YOffset = 0;      Is there a better way to setup the class (or sub classes) to make it easier for the developer to understand how to use this functionality?


title: How are mixins or traits better than plain multiple inheritance?

text: C++ has plain multiple inheritance, many language designs forbid it as dangerous. But some languages like Ruby and PHP use strange syntax to do the same thing and call it mixins or traits. I heard many times that mixins/traits are harder to abuse than plain multiple inheritance. What specifically makes them less dangerous? Is there something that isn't possible with mixins/traits but possible with C++-style multiple inheritance? Is it possible to run into the diamond problem with them? This seems as if we were using multiple inheritance but just making excuses that those are mixins/traits so we can use them.


title: How to drastically improve code coverage?

text: I'm tasked with getting a legacy application under unit test. First some background about the application: It's a 600k LOC Java RCP code base with these major problems   * massive code duplication   * no encapsulation, most private data is accessible from outside, some of the business data also made singletons so it's not just changeable from outside but also from everywhere.   * no abstractions (e.g. no business model, business data is stored in Object[] and double[][]), so no OO. There is a good regression test suite and an efficient QA team is testing and finding bugs. I know the techniques how to get it under test from classic books, e.g. Michael Feathers, but that's too slow. As there is a working regression test system I'm not afraid to aggressively refactor the system to allow unit tests to be written. **How should I start to attack the problem to get some coverage quickly** , so I'm able to show progress to management (and in fact to start earning from safety net of JUnit tests)? I do not want to employ tools to generate regression test suites, e.g. AgitarOne, because these tests do not test if something is correct.


title: What are the key points of Working Effectively with Legacy Code?

text: I've seen the book Working Effectively with Legacy Code recommended a few times. What are the key points of this book? Is there much more to dealing with legacy code than adding unit/integration tests and then refactoring?


title: A container only assets in Rails

text: I have multiple segmented Rails apps that are connected to each other:   * App A   * App B   * App C While I try to keep the design, such as header and footer, to look similar, but each app has its own stylesheet, javascript and images in the asset folder. Some of these assets are duplicate, like CSS for footer. It makes maintenance difficult. I'm wondering if I could do something like having App D, where App A, B, and C will just retrieve the assets from App D. So if I need to change anything, I can just change the assets in App D. How do I achieve this?


title: Use and manage Front End Assets for Web

text: I am a beginner and am currently developing a kind of cms using PHP. The number of libraries that we can potentially use in the front end is large. I have a question about properly selecting, managing and using front end asset libraries. I don't think just including a bunch of front end libraries like this is the best approach:               <script src="library1" /></script>     <script src="library2" /></script>     <script src="library3" /></script>     // and soon..      What if we use, let's say 20 ? Is that good practice, declaring the script tags 20 times ? What I do currently is use `Assetic`, a php library for managing assets. I create a dump file (and cache it) for each request to my application before loading a template. My controller (I use MVC) could be something like this:               function indexAction()     {         // some logic              $assetManager = $this->get('assetic'); // get assetic service         $css = $assetManager->createAsset(array(                 '@bootstrap',                 '@jquery_ui'                  // and many other library         ));               $assetContent = $css->dump();               // create asset url, dont mind about this          $data['stylesheet'] = $this->createAssetUrl($assetContent);              return $this->render('index-template', $data);     }      And in the template (index-template), I could put kind of:               <link href="<?php echo $stylesheet ?>" rel="stylesheet" type="text/css">      I do that in almost every controller to include a bunch of assets to view. But I am not sure if this is the best method. Are there any better practical method that I don't know ?


title: Where and when should I use RESTful

text: When I should use REST? In what kind of web applications? In terms of java in what situation RESTful would be better than ordinary servlets / JSP ? Imagine that I have a web page where users can upload two kinds of files and create some objects that are later saved in DB(current tasks etc). The only think users can download is this two kinds of files. Will RESTful be a good approach in that kind of service?


title: What did machine code for 4-bit architecture look like?

text: I don't know how a 4-bit instruction could be enough to do something so I read about the Intel 4004 and it says that it used 8-bit instructions and then I can understand how opcode and numbers has enough digits. Is it true that there never were any 4-bit instructions and that 4-bit systems use 8-bit instructions?   And that opcode and two numbers in an instruction can be done in 8 bits but not in 4 bits?


title: Manual dependency injection or abstract factory

text: We're starting to use dependency injection in a fairly large, interactive program. It's early yet, but I have a feeling that the majority of the objects being injected are going to want runtime data passed in to their constructors. Prior to this, I've only used DI in web applications where building everything at the composition root isn't a problem. When working with runtime data, it sounds like the options are to use manual injection or abstract factories. Is there anything important to consider when deciding between the two or does it mainly come down to personal preference? I'm using Ninject with the factory extension, so going the factory route isn't too onerous. However, if we end up with factories in every class, is that a sign that we're doing something wrong? Should we prefer manual injection when the power of an IoC container isn't needed? Could it simply mean that we're over-using dependency injection?


title: Should I be using OOCSS in a CSS theme?

text: I have heard of OOCSS some time ago, but never really looked into it. Today I did so, and I thought of the implications of applying OOCSS to a simple CSS theme. One problem I thought of is that, by its nature, OOCSS encourages DRYness and consequently the use of many concise classes that should be applied to elements by the HTML developer. As a CSS theme, I would assume it isn't something significant enough for a developer would go out of his/her way to add specific classes to their elements when writing HTML:               <button class="blue rounded no-border $etc">Button</button>      as opposed to:               <button>Button</button>      Perhaps the HTML developers would be OK with writing the extra code, although it seems there is just as much repeating code on the HTML side as there would be without OOCSS. So, is OOCSS not a one-size-fits-all methodology for writing CSS code, as in this example? Or am I not understanding things properly?


title: How to handle fine grained field-based ACL permissions in a RESTful service?

text: I've been trying to design a RESTful API and have had most of my questions answered, but there is one aspect of permissions that I'm struggling with. Different roles may have different permissions and different representations of a resource. For example, an Admin or the user himself may see more fields in his own User representation vs another less-privileged user. This is achieved simply by changing the representation on the backend, ie: deciding whether or not to include those fields. Additionally, some actions may be taken on a resource by some users and not by others. This is achieved by deciding whether or not to include those action items as links, eg: edit and delete links. A user who does not have edit permissions will not have an edit link. That covers nearly all of my permission use cases, but there is one that I've not quite figured out. There are some scenarios whereby for a given representation of an object, all fields are visible for two or more roles, but only a subset of those roles my edit certain fields. An example:               {         "person": {             "id": 1,             "name": "Bob",             "age": 25,             "occupation": "software developer",             "phone": "555-555-5555",             "description": "Could use some sunlight.."         }     }      Given 3 users: an Admin, a regular User, and Bob himself (also a regular User), I need to be able to convey to the front end that: Admins may edit all fields, Bob himself may edit all fields, but a regular User, while they can view all fields, can only edit the description field. I certainly don't want the client to have to make the determination (or even, for that matter, to have any notion of the roles involved) but I do need a way for the backend to convey to the client which fields are editable. I can't simply use a combination of representation (the fields returned for viewing) and links (whether or not an edit link is availble) in this scenario since it's more finely grained. Has anyone solved this elegantly without adding the logic directly to the client?


title: How to explain pointers to a Java/VB programmer

text: I am writing a game and my friend has offered to help me as it is a RPG and will take a long time to do the "scripting" bit of the game. The problem is IMO he's not that good a programmer :( (add flame war here). He has only programmed in Java and VB and keeps saying really stupid things to me like "Why don't you drag and drop an onClick event" to design my UI when I'm using DirectX. I tried explaining pointers to him but his response was, if it's just a variable that holds a memory address, why don't you just use an int? I create an instance of an attack class and give the creature a pointer to it so if several creatures use the same attack there is only one instance of it. He keeps saying why not put if statements in the creature class for every attack class and set true for the ones that are there. He has programmed mainly in VB and a little in Java just to learn OOP. How can I explain advanced C++ concepts like pointers and memory management to him? He just doesn't understand there are no super functions like form.show in C++.


title: Android: Not able to experiment on own?

text: I have just started learning Android App Development a few days ago, with prior knowledge of C/C++, HTML and CSS. This is the situation I am facing Repeatedly: I am learning from a Video Tutorial Series, after each video, or each few videos, I say myself: Let's use what I have just learnt in the simple (and also "meaningless") app that I have made so far by watching the tutorials. I start implementing it, but then after a few minutes, I realize that I cannot do it because I do not know a few other syntax related to the particular thing, (or) I do not know whether these things can be combined with these other things by the use of . (dot). Whatever I try, I get either an error in eclipse or "Sorry...the app com.example.simple has stopped unexpectedly...." when the app runs. Then I search StackOverflow, Google and learn that what I want to implement requires learning about a few more classes, syntax and creating a few more java classes. I am not able to experiment on my own. Is it normal? Is it the HARD-WAY in which one is supposed to learn? Should I first learn Java and then come back to Android - would that be helpful?


title: Ruby workflow in Windows

text: I've done some searching and quite haven't come across the answer I am looking for. I do not think this is a duplicate of this question. I believe Windows could be a suitable development environment based on the mix of answers in that question. I have been developing in Ruby (mostly Rails but not entirely) for about a year now for personal projects on a Macbook Pro however that machine has faced an untimely death and has been replaced with a nice Windows 7 machine. Ruby development felt almost natural on the Mac after doing some research and setting up the typical stack. My environment then included the standard (Linux like) stuff built into OSX, Text Wrangler, Git, RVM, et al. Not too much of a deviation from what the 'devotees' tend to assume. Now I am setting up my new Windows box for continuing that development. What would my development environment look like? Should I just cave and run Linux in a VM? Ideally I would develop in Windows native. I am aware of the Windows Ruby installer. It seems decent but its not exactly as nice as RVM in the osx/linux world. Mercurial/Git are available so I would assume they play into the stack. Does one develop entirely in Windows? Does one run a webserver in a Linux VM and use it as a test bed while developing in Windows? Do it all in a VM? What does the standard Windows Ruby developer environment look like and what is the workflow? What would a typical step through be for adding a new feature to an ongoing project and what would the technology stack look like?


Why is it often said that the test cases need to be made before we start coding?   What are its pros and what the cons if we don't listen to this advice? Moreover, does that advice refer to black box testing or White Box testing or both?


title: Why don't many code review tools seem to be syntax aware or provide more in-depth analysis of changes?

text: Why don't many code review tools seem to be syntax aware or provide more in- depth analysis of changes? Is it simply too hard to do? I find this to be a major hole of most programmer's toolkits. From what I have seen, which admittedly is not much, code review tools just compare code line- by-line with many of them not even being able to do syntax highlighting. Is there a solution out there that is smart enough to offer file-level, method-level code review/comparison? One of the simple problems I have is that methods get re-ordered in code and my code review software breaks down completely, but they should be able to do so much more. I'm interested in others opinions/knowledge on the topic of code review/comparison tools.