title: How do I deal with the need to know multiple programming languages?

text: I am a relatively young programmer. I am 23 and I have been programming professionally for about 5 years. As most programmers I started with C, learned some x86 assembly for fun and then I found C++ which turned out to be my greatest passion in the programming world. Programming with C and C++ forces you to learn platform specific APIs, libs and frameworks all of each requires constant study and experimentation. After some time I had to move on to Java and C# as the demand on my region is basically for these languages. With these languages I entered the world of web development and then I had to learn javascript. Developing for the .NET Framework was exciting at first but I constantly felt as I was getting tied up by Microsoft (and of course the .NET Framework was driving me away from Linux). For desktop development I could do pretty much everything I did with .NET using C++ with Qt but for web development I had to look for an alternative. Quickly I found Django and then I proceeded to learn Python so I could use Django. Nowadays I am learning iOS development with Objective-C. So far it was pretty much easy to learn all these languages (C++ trained me well) but I am worried that someday I won't be able to keep track of them all. Just to clarify. The only languages I learned cause I had to were C# and Java. All of the others I learned for fun, because I love programming and learning new things. Also I like to keep my skills sharp on desktop, web and mobile development. My question is: How do you keep track of multiple programming languages? (I mean, keep track of changes to these languages and keep your skills sharp) and: Is there such a thing as enough programming languages?


title: Using source code under LGPL in .NET, converted from JAVA?

text: I found one JAVA project useful to our commercial software which is developed using C#. The JAVA project is under LGPL. My understanding is (please correct me if I am wrong) if I use one compiled LGPL library (for example, .dll in Windows), I don't even need to disclaim the license information. But if I need to make some modifications in the source code, I need to include the LGPL license, and make my modification part which uses the library also under LGPL. Since our software is in .NET, I clearly need to modify from the JAVA source code (starting by converting using Sharpen in Eclipse and then make some manual modification). So my question is, if I convert it to a C# project and compile as a library, and include the license when we are distributing it, is it enough? Do I need to make the source code of the whole new project available (upon request)?


title: Does software reuse preclude process repeatability

text: ## The Problem - Code Reuse I was thinking about this question on software delivery, and I kept coming back to the issue of repeatability and / or reproducibility. They matter, because if you don’t repeat a project then it becomes more difficult to improve the process you used to build the project. Engineering involves constantly improving the processes involved with design and construction in order to produce higher quality projects. Software can rely heavily upon reuse due to its digital form. Instead of rewriting a module, we just call it again or copy it to the other system. Some examples are authentication / login or perhaps a logging function. There are many well known examples for those categories, and conventional wisdom is to reuse what exists instead of rolling your own. ## Comparisons to Other Disciplines ### Construction In contrast, construction of physical systems (buildings, bridges) is nowhere near as reusable. It’s true that the blueprint of a house can be reused many times to build the same copy of the house, but the construction must be performed each time. Cut & paste doesn’t work like that in the analog world. Bridge blueprints are less reusable that houses because site conditions will vary. Master builders are experts recognized for having designed and / or built tens, hundreds, or thousands of things in their area. For example, Frank Lloyd Wright, a world renowned architect and designer `designed more than 1,000 structures and completed 532 works`. Contrast that with Anders Hejlsberg who has designed “just” five languages (Turbo Pascal; Delphi; J++; C#; Typescript). In many ways, it’s an unfair comparison because the domains are different. But at a broad level, the quantifiable production from two very intelligent people is vastly different. ### Martial Arts Martial artists will say that mastery of a move comes only from thousands of repetitions. After a good portion of those repetitions have been put in, many martial artists are surprised at how a previously perceived to be complex kata or form has become simple. Instructors of those students will also notice how the motion becomes more fluid and purposeful as well as having an economy of motion. Likewise, experienced martial artists are able to pick up more complex katas more quickly than less experienced students. Experience from repetition has given them a framework or process that allows them to learn more quickly. ### Woodworking Woodworkers experience a similar transformation. Hobbyist woodworkers always refer back to their first project that required a lot of drawers. If they complete the project, they gain a new appreciation for the efficiencies that assembly lines produce. There are other benefits such as a better understanding of how to lay out the drawers parts on the sheet stock in order to maximize use of the wood. Compared to hobbyists, professional woodworkers are able to more quickly design, start, and construct items that they have made many times before. They also gain an ability to see inherent issues within someone else's design having made that mistake in their work. ## Does software reuse prevent software developers from becoming more proficient? In many ways, software design and construction is always new. We don’t repeat past works, because if we can reuse a module, library, or system then we do. We’ll preferentially extend an existing system before rewriting the entire thing from scratch. But repetition is what allows us to find efficiency in the design and the construction. Anyone who has practiced a sport or physical activity will tell you that repetition is the key to becoming a good practitioner. **My question:** Does software’s ability to be reused prevent the necessary process improvement and efficiency that comes from repeating a project?


title: How to get new team members up to date with the project?

text: We are about to hire 1-2 new engineers for the software team (consisting of 3 developers, 1 tester). What are the steps to integrate them into the team? My ideas are :   * read documentation (coding standards, documents in development methodologies we use)   * get them to read the existing code   * assign them some simple tasks   * at the end, make them responsible for the code part What else could we do? * * * The project is in a medical sector (ultrasound system), and is already 5 years going. We have yearly releases, and we are about to finish one release, when we want to add 1-2 engineers. The project is in the maintenance phase (refactoring legacy code, plus adding new features). Things are pretty much on schedule (more or less).


title: Inputs and outputs to a method mixed in the UI

text: I am designing the front end of an WPF application using MVVM where basically all we are doing (for now) is calling a method with some inputs and displaying the outputs. There are two types of inputs, I will call them common inputs and specific inputs to simplify things. With the common inputs you have one instance, and all of the common inputs are used (this is non-trivial). Then we have a list of specific inputs, these are each paired with the common inputs and fed into the method (there are reasons they all need to run at the same time). What distinguishes them is that the same variables you input can also be outputs. Also, you don't have to fill in all of the inputs, there are some where you can pick a subset and whatever the user does not fill in will be calculated and fed back as an output. Which brings us to the problem, the UI will have a grid which at first will have columns for every input (the other columns will be bound but not visible) and rows for how many specific inputs are in the batch. The user will fill in the inputs they want and hit a big button. The method will be called and the outputs generated, they will bind into the output columns which would become visible. Also, getting results for some inputs might not be possible, in the method if we can't run at a certain position but we can run for a position sufficiently close the input will be overwritten. We need to save both the input and the output and display some sort of attention drawing behavior of the cells. The only way I can think of to do this is have three lists, your inputs your outputs and a list of a view model with all common properties and a few for visibility and if the input and output agree. This third list would be bound to the UI and its properties would be pulled into the input list before running the method and the output of the method pushed to it afterwards. I think this will solve the problems but I have a vague sense of discomfort about doing this. For one thing mixing input and output properties on the view model seems like we are duplicating the model but with the business logic scrambled together. Does anyone have a suggestion for a better design, or a reason why this plan is good/bad? Thank you,


title: What should be the minimal design/scope documentation before development begins?

text: I am a junior developer working on my own in the programming aspect of projects. I am given a png file with 5-6 of the pages designed, most times in specific detail. From this I'm asked to develop the back end system needed to maintain the website, usually a cataloging system with products, tags and categories and match the front end to the design. I find myself in a pickle because when I make decisions based on assumptions about the flow of the website, due to a lack of outlining details, I get corrected and am required to rewrite the code to suit what was actually desired. This process happens multiple times throughout a project, often times on the same detail, until it's finally finished, with broken windows all through it. I understand that projects have scope creep, and can appreciate that I need to plan for this, but I feel that in this situation, I'm not receiving enough outlining details to effectively plan for the project, resulting in broken code and a stressed mind. What should be the **minimal** design/scope documentation I receive before I begin development?


title: What to call pure JavaScript standalone (web)apps for which I've not written any server side code?

text: I've been writing a few tools as standalone webapps for which I have written no server side code and it strikes me that I'm not sure what people call such things. I like them because they can be distributed as a single file that anybody with a web browser can run. Typically all the funky stuff is done by calling AJAX web APIs like those provided by Stack Exchange, MediaWiki, Google, etc. The following terms all seem plausible but might also cover other things or not tell the whole story:   * client-only   * pure JavaScript   * standalone webapp   * web script   * web tool   * browser app **Is one of these terms or something else in common use for such apps / tools?** Here's links to some of my little tools on GitHub: travel-se-airport- tags.html, travel-se-1-or-2-answers.html, travel-se-stats.html There are some much more app-ish examples in the 10k Challenge...


title: Why did Microsoft make parameters, local variables and private fields have the same name naming convention?

text: I asked this question quite some time ago: How do you name your private variables in C#? In one of the answers, I was pointed to Microsoft's MSDN page that shows that private variables/fields should be named like this:               private int myInteger;      But a parameter would be:               void SomeMethod(int myInteger)      and a local variable would be like this:               int myInteger;      So when you reference them like this               myInteger = 10;      you have no way of knowing which one you are talking about. I am now starting a new project and one of my co-workers is asking me why we don't do something to differentiate at least some of these. I am wondering the same thing. Why didn't Microsoft's standard keep these different?


title: Observing MVC, can/should the Model be instantiated in the ViewController? Or where?

text: I'm writing an experimental iPhone app to learn about the MVC paradigm. I instantiate my Model class in the ViewController class. Is this stupid? I'm asking because storing the id of the Model class, and using it works where it's initialized, but referring to it later (in response to an interface action) crashes. Seemingly, the pointer address of my Model class instance changes, but how can that be? The code in question:               @interface Soundcheck_Tone_GeneratorViewController : UIViewController {              IBOutlet UIPickerView * frequencyWheel;     @public         Sinewave_Generation * sineGenerator;     }          @property(nonatomic,retain) Sinewave_Generation * sineGenerator;          @end          @implementation Soundcheck_Tone_GeneratorViewController          @synthesize sineGenerator;          - (void)viewDidLoad {         [super viewDidLoad];         [self setSineGenerator:[[Sinewave_Generation alloc] initWithFrequency:20.0]]; // using reference -> fine     }          // pickerView handling is omitted here...          - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {          [[self sineGenerator] setFrequency:20.0]; // using reference -> crash     }          @end               // the Sinewave_Generation class... only to be thorough. Works fine so far.          @interface Sinewave_Generation : NSObject {                  AudioComponentInstance toneUnit;         @public             double frequency,theta;          }          @property double frequency;          - (Sinewave_Generation *) initWithFrequency: (int) f;          @end               @implementation Sinewave_Generation          @synthesize frequency;          - (Sinewave_Generation *) initWithFrequency: (int) f      {         self = [super init];              if ( self ) {             [self setFrequency: f];         }              return self;     }          @end


title: Should marketing ecommerce departments have their own web developers?

text: I have seen examples of web design teams sitting under marketing with the development being done in IT. How do other IT depts and marketing ecom depts share the workload for web development in other companies citing any pros and cons for the different possible structures? Personally having any type of development resource sitting outside of IT just sounds like a bad idea.


title: Why would one overload the && and & operator?

text: The same question goes for | and ||. Why would one overload or 'use' the & and && operator? The only use i thought of are   * Bitwise Ands for int base types (but not float/decimals) using &   * logical short circuit for bools/functions that return bool. Using the && operator usually. I cant think of any classes that use those operators. Absolutely none. I know a class might support + (and not '-') which combine two strings together. I seen an object such as datetime overload '-' so two dates can be subtracted to make a timespan (obviously you cant add two dates) but i never seen &, &&, | and || used. Does anyone know of a use? In any language?


title: What do DBAs do?

text: Yes, I know they administrate databases. I asked this question because I'd like to get a further insight into the kind of day-to-day duties a DBA might perform, and the real-world business problems they solve. For example:   * I optimized a 'products' query so that it ran 25% faster, which made the overall application faster. Is this a typical duty? Or is there more to being a DBA than simply making things faster? In what situations does DBA work involve planning and creativity?


title: Avoid Initial AJAX Call for Loading Data

text: Here is the typical sequence of events when someone navigates to a page in my application:   * The user navigates to my application, including URL parameters and query strings.   * The server receives the request and generates the HTML   * On the client, AngularJS grabs any parameters and makes an AJAX call   * The resulting data is then bound Personally, I find it a bit wasteful that this requires two hits to the server. It leads to a delay between the HTML being returned and the inputs being populated. Am I missing something? Is there a way to avoid going back and forth the first time?


title: Algorithm to denormalize database

text: I have built a QlikView script generator (QVS), that can be used to generate large script files for data imports from SQL Server to QlikView. QlikView does not like 'fully' normalised database structures (loops between several tables): for example, three tables `A`, `B`, `C` in SQL Server could have three PK/FK links; in QlikView it requires just two. So, I now have to 'denormalize', or remove the loops between tables... Currently I am creating an 'exclusion table', which I traverse with an quad- imbedded for-loop, to isolate and remove constraints in the DB structure before generating the script file. This seems to work, but takes WAY too long as the number of tables can be large. Is there another way that I can achieve what I want more economically?


title: Namespace Extension for Dropbox-like Windows application

text: I'm interested (for learning purposes) in creating an Namespace Extension for Windows that is similar to Dropbox or SkyDrive. What I'd like to do is integrate directly with Windows Explorer like those services that appear as a "connected drive": ![Skydrive](http://i.stack.imgur.com/ujHrd.png) When clicking on the connected folder, I'll be interacting with my own site to determine what contents to display. I'm familiar with WebDAV, and I've actually created something similar to this with WebDAV but now I want to move away from "mapping drives". I want an installable application that, after initial setup like SkyDrive or Dropbox, would just appear as a connected drive and be authenticated as the user. I've never created a Namespace Extension but my research is pointing towards that being the way to go. Am I correct in this? Is it possible, with a Namespace Extension to create a new "Folder" object that, upon navigating in to, I can make calls to an API of mine that will determine the subfolders to display?


title: Agile Development & Interaction with Developers

text: I have read in few blogs that as part of agile development , the product owner closely interact with developers to state their requirements and come up with a solution. However in case of a large project (in terms of number of applications involved) involving multiple systems , is this possible? Shouldn't the project have a business analyst / solution designer in order to capture the requirements properly and come up with a solution which states how the the requirement could be fulfilled and which systems must do what activity?


title: Spurious wakeups explanation sounds like a bug that just isn't worth fixing, is that right?

text: According to the Wikipedia article on Spurious Wakeups > "a thread might be awoken from its waiting state even though no thread > signaled the condition variable". While I've know about this 'feature' I never knew what actually caused it until, in the same article > "Spurious wakeups may sound strange, but on some multiprocessor systems, > making condition wakeup completely predictable might substantially slow all > condition variable operations." Sounds like a bug that just isn't worth fixing, is that right?


title: When do you drop support for an old program version?

text: .NET 1.1. IE6. Java 1.1. All of these are old ancient versions of software that still for some reason exist in organizations that are too scared to upgrade, don't like change, or follow the "If its not broken, don't fix it" principle. But when do you drop support for such old versions of software? What determines when a platform is too old?


title: Formatting 'Complex' Math

text: **Note:** by 'complex' math I mean an equation with many steps involved and a wide mix of operators. A programmer _should_ know the order that operators are evaluated in an equation. However it can be a royal pain to look at an equation such as:               result = value_1 + value_2 * value_1 + value_3 / value_4 % value_5;       One option is to write out the equation in multiple steps such as:               part1 = value_2 * value_1;     part1 += value_1;          part2 = value_4 % value_5;     part2 = value_3 / part2;          result = part1 + part2;      Another option is to format the original equation with parenthesis such as:               result = (value_1 + (value_2 * value_1)) + (value_3 / (value_4 % value_5));       When dealing with complex math in code, how do you typically format it to maximize readability?


title: When is the right time to change programming language?

text: I was working as a Java Developer before and I have now finished my contract with my previous employer. But now, as I am looking for a new job, a lot of opportunities out there seem to not include Java as much as other languages. I really like Java and I have been using it since college. But it seems like I have to learn a new language so I can have a new job. When is the right time to consider changing the language I use?


title: How to handle repetitive code dealing with object properties?

text: Every so often I run into a situation where I need to map a set of properties from one object to another object of a different, unrelated class. The set of properties is large enough to make typing out the code by hand tedious. Anti- DRY principle code like this is the result:               if (objectOfType1.getPropertyA() != null){objectOfType2.setSimilarlyNamedPropertyA(someMethod(objectOfType1.getPropertyA()));}     if (objectOfType1.getPropertyB() != null){objectOfType2.setSimilarlyNamedPropertyB(someMethod(objectOfType1.getPropertyB()));}     ...skipping some lines...     if (objectOfType1.getPropertyZ() != null){objectOfType2.setSimilarlyNamedPropertyZ(someMethod(objectOfType1.getPropertyZ()));}      Writing and even looking at code like this is a huge pet peeve, but I feel like using an introspection library like BeanUtils to avoid having a couple of methods like this would irritate my coworkers. I've taken to writing one-off scripts to generate code like this for me. How have other programmers addressed this problem? **Edit** : Here's the code translated to use reflection/introspection. Sure it's DRY, but it might make an enemy out of the next programmer on the project, and I can be just as productive generating code like above with a script. That said, if this is more common than I suspect, please fill me in:                   //Is this really a common technique to use when there's a simpler method?         String[] propertyNamePartsArr = {"A","B", ...skipping some parts..., "Z"};         List<String> propertyNameParts = new ArrayList<String> (Arrays.asList(propertyNamePartsArr));              for (String propertyNamePart : propertyNameParts) {             try {                 Object originalValue = BeanUtils.getProperty(objectOfType1, "property" + propertyNamePart);                 if (originalValue != null) {                     BeanUtils.setProperty(objectOfType2, "similarlyNamedProperty" + propertyNamePart, someMethod(originalValue));                 }             } catch (IllegalAccessException e) {                 handleIllegalAccessException(e);             } catch (InvocationTargetException e) {                 handleInvocationTargetException(e);             } catch (NoSuchMethodException e) {                 handleNoSuchMethodException(e);             }         }


title: Parameter order: size, count or the other way round

text: I hope this is the right forum for this ... Well, in C, the standard library uses usually `(void* buffer, int size)` when referring to some data buffer. I wonder if there is a rationale for this order instead of `(int size, void* buffer)`. I couldn't think of any good reason, and it seems to be an arbitrary choice, but I'm curious to here if there is some deeper meaning behind this order.


title: Solo developer vs. team developer : should I move on?

text: I work as a solo developer in a small company. There's more than enough work, but the same does not apply for money. Thus, I won't be seeing any new colleagues in the near future. I am responsible for absolutely everything that has do to with IT operations. This involves development and maintenance of software used in-house, development and maintenance of various websites which our clients use, website infrastructure, local network infrastructure including maintenance of several servers and in-house support to mention the most immediate things. I really enjoy 95% of what I do, and I've got a high degree of flexibility in my work. I get to decide what do when, and no one really tells me what do to except that I now and then sit down with my colleagues to create a roadmap for what I need to get done. I do consider myself to have a high work ethic and being above average focused on what I do, so things get done. However, I've come to the point where I really miss having other people around me who work with the same. Even though I need to get familiar with a wide range of technologies as I am a solo developer, I have the feeling that I am missing out one the "knowledge sharing" which other "like minded" people who work in bigger companies are taking part in. I don't really have anyone to discuss programming obstacles and design decisions with - and I am starting to miss that. Also, I'm worried about what future employers might think of this "hermit" who has been working on his own for too long to ever be able to take part in a team. However, on the other side, I'm thinking that I won't get my current degree of flexibility in a larger company. I'll be seeing a lot more strict deadlines, late hours and specialized areas of work. Also; I'm not sure if this idea of "knowledge sharing" will ever take take place? Has anyone else been in this situation? Is it a good idea seen from a career perspective and a personal development perspective? Should I consider moving on to a bigger place to (maybe) become a part of a larger group of developers and "like minded" people? In other words, will the grass be greener on the other side?


I have multiple tables in my database. Some tables have relationship to others and some don't have. My friend told me that it is not advisable to have a table that is not related to others. Is it substandard if I have multiple tables in my database yet there's no relationship at all? Are there guidelines concerning to database table relationships? And also, what are the guidelines in cascading tables? thanks.


title: Requirements Analysis Communication

text: How can I convert this requirement into one requirement: For columns where there are just numbers, numeric sorting will be used. For columns that have numbers and letters, alpha-numeric sorting will be used. For Date columns, time sorting will be used. All sorting will have ascending and descending properties.


title: What is the ideal length of a method?

text: In object-oriented programming, there is no exact rule on the maximum length of a method , but I still found these two qutes somewhat contradicting each other, so I would like to hear what you think. In _Clean Code: A Handbook of Agile Software Craftsmanship_, Robert Martin says: > The first rule of functions is that they should be small. The second rule of > functions is that they should be smaller than that. Functions should not be > 100 lines long. Functions should hardly ever be 20 lines long. and he gives an example from Java code he sees from Kent Beck: > Every function in his program was just two, or three, or four lines long. > Each was transparently obvious. Each told a story. And each led you to the > next in a compelling order. That’s how short your functions should be! This sounds great, but on the other hand, in _Code Complete_, Steve McConnell says something very different: > The routine should be allowed to grow organically up to 100-200 lines, > decades of evidence say that routines of such length no more error prone > then shorter routines. And he gives a reference to a study that says routines 65 lines or long are cheaper to develop. So while there are diverging opinions about the matter, is there a functional best-practice towards determining the ideal length of a method for you?


title: How to setup users for desktop app with SQL Azure as backend?

text: I'm considering SQL Azure as DB for a new application I'm developing. The reason I want to go with Azure is because I don't want to have to maintain yet another database(s) and I want my users to be able to access the data from anywhere. The problem is that I'm not clear regarding how to users will connect. The application is a basic CRUD type of windows app. I've read that you need to add your IP to SQL Azure's firewall to connect to it, but I don't know if it's only for administration purposes only. Can anyone clarify if anyone (anywhere) can access the data with the proper credentials? Which of the following scenarios would work best (if at all)? A) Add each user to SQL Azure and have the app connect directly to Azure as if it was connecting to SQL Server B) Add an anonymous user SQL Azure and pass the real user's password/hash with every call so the Azure database can service the requests accordingly. C) Put a WCF service in between so that it handles the authentication stuff. The service will only serve the appropriate information to the user given his/her authentication and SQL Azure would be open to the service exclusively. D) - ideas are welcomed - This is confusing because all Azure examples I see are for websites. I have a hard time believing SQL Azure wouldn't handle the case of desktop apps connecting to it. So what's the best practice?


title: Erlang function naming conventions

text: I understand the general Erlang conventions for functions are using snake case or camel case, but what about exported functions? For example, say I have a gen_server module that defines a check to see if a username is in use:   * I have a call along the lines of `handle_function(is_username_in_use, UserName)`.    * I also have an exported function named `is_username_in_use` that calls `gen_server:call/2`.  But internally I also define a method that checks a database. So I end up with something along the lines of `check_if_username_is_in_use_in_db` for internal use. It quickly gets out of hand, and I end up with uncomfortably long names. Is there a common convention used to name functions like these? I was thinking something along the lines of `is_username_in_use_internal`


title: Percent or Pixels HTML/CSS

text: Coding a new website. Basically, for position elements using CSS I would use percents and figured that was the best thing to do since everyone's monitor was a different size. But I noticed a lot of big websites use pixels. I don't understand how you can use pixels to position things since we all have a different size screen?


title: 2 Years Work Experience, Should I treat it like im a College Graduate?

text: So I just got laid off from a company after 2 years, no fault of my own. It was a large, rather well known company that had been doing cuts for the entire year (almost 75% of our department was cut). I made it until the very end before they finally did a final budget cut. I realize this is probably skimming Career advice but I'm more concerned on the actual development side when looking for a job. When I'm looking for something, should I consider my 2 years as real experience? Or since it's so short, should I be looking like I just graduated college (since this was my first "real" job after college).


title: Best practices in creating JavaScript styling API's: Balancing CSS and JavaScript

text: I have written a number of components for Durandal--DatePicker Widget, Tabs Widget, Radio Widget, etc. I'm having a little conceptual difficulty in how best to balance a styling API with CSS. For example, in the Tabs Widget, I set up default css classes for the various stylable features of the widget. Those default classes come with a default styling, of course. But they can be restyled, and through the Styling API, can be renamed as well. I use this pattern in all of the components. Now, if an end user (myself, for now) want fixed-width tab buttons, he only needs to adjust his CSS accordingly (e.g. min-width: 90px, width: 90px, etc.). But, initially, I felt compelled to include configuration properties called isTabsFixedWidth and fixedWidth. When the user passes in the configuration object, using JavaScript I modify the CSS according to properties set on that configuration object. Also, a function on the Tabs Widget called #setWidthPolicy(policy, [width]) is included. But this seems redundant to me. What are the best practices here? Is it necessary for all styling support to include support for raw CSS, support for configurable CSS through a configuration object, and support for modifying CSS dynamically through member functions? Does anyone have any recommendations here? Thank you.


title: Function parameter names

text: I just found the following code in our code base:               public String identifyArchitectureName(String platformName, String input) ...      In my opinion `input` is one of the most meaningless names for a variable that can be. Is it just me? I can just quietly change it, but should I address the fellow programmer that has done it?


title: Should I be learning JavaScript before studying computer science?

text: So I've done a lot of research and found that Codecademy has been mentioned several times on other forums. I got stuck in and chose JavaScript through Codecademy most probably thinking it was 'Java' and I'm now slightly concerned that I have made a bad choice.. due to the fact that I see posts mentioning JavaScript teaches bad habits and so on... Should I stop and learn other languages offered on 'Codecademy'? Should I stop using codecademy altogether? Or finally should I just wait until I start my degree and pose as a blank canvas? All opinions wanted, thank you. P.s I'm not entirely certain what jobs I will be applying for in the future but to give some indication I don't believe it will be website development and more so on the game or application designing side of things


title: Questions about Polymorphism

text: So I understand the importance of Polymorphism, including how vital it is. But something I don't quite understand is what about the `Constructor` and any inherited `Class` the initial `Base Class` may have. For example, I have a class to test some criteria- Level of account, Windows Version, and some other checks.               // Base Class     public class CheckInstalled : CheckUserLevel     {            public CheckInstalled()            {                  // Check verify the CheckUserLevel token is true, if it isn't throw an exception and close.                  if (!(_level == true))                  {                         // The above implementation would technically go here.                  }             }                  public virtual void IsInstalled()             {                  // Implementation of initial check of general software.             }     }      So that would in theory be the `Base Class` which will do a Generic check; but there are other applications I need to test if they are installed. So now I would create a `Class` for:   1. Sql   2. IIs   3. Dnn Or whatever you may need to ensure is checked. So for each of those `Classes` I'd inherit the `CheckInstalled Class`. In each one I'd have this:               public override void IsInstalled()     {           // Implementation to check for that specific Class Item is installed.     }      So I see how Polymorphism will really simplify and keep each one of these `Classes` separate. But will provide that flexibility for Object Orientation. **The root of my question, the`Base Class Constructor` contains that inherited token value. But do all other `Classes` that inherit the value? Essentially that `Base Class Constructor` consistently execute? Or does the `_level` token have to be called in each?** Hopefully that makes sense. If not please let me know and I'll try and rephrase it. * * * **Update:** The _level is invoked here:               class CheckUserLevel         {                  // Token Bool:             private bool _level = false;                  #region Constructor:                  protected CheckUserLevel()             {                      // Invoke Method On Creation:                 Elevate();                  }                  #endregion                  public void Elevate()             {                      // Get Identity:                 WindowsIdentity user = WindowsIdentity.GetCurrent();                      // Set Principal                 WindowsPrincipal role = new WindowsPrincipal(user);                      #region Test Operating System for UAC:                      if (Environment.OSVersion.Platform != PlatformID.Win32NT || Environment.OSVersion.Version.Major < 6)                 {                          // False:                     _level = false;                          // Todo: Exception/ Exception Log                      }                      #endregion                      else                 {                          #region Test Identity Not Null:                          if (user == null)                     {                              // False:                         _level = false;                              // Todo: "Exception Log / Exception"                          }                          #endregion                          else                     {                              #region Ensure Security Role:                              if (!(role.IsInRole(WindowsBuiltInRole.Administrator)))                         {                                  // False:                             _level = false;                                  // Todo: "Exception Log / Exception"                              }                              else                         {                                  // True:                             _level = true;                              }                              #endregion                               } // Nested Else 'Close'                      } // Initial Else 'Close'                  } // End of Class.              }      The separate class actually generates the boolean value; as anytime that class is invoked it will assign a value to it. I didn't want to expose too much with this class mostly because of its role in testing for Administration. The problem: > Several methods will require Administrative Permission; my thought was to > inherit on the base `CheckInstalled`. Which in it's creation will > automatically check the boolean state of `_level`. Then from that point; > this `CheckInstalled` can be inherited to other classes; then I can simply > `override IsInstalled` to bend to the desired task for that item. Is that a bad thought on my part?


title: Server side JavaScript rendering

text: I have almost a 'best-practice' question that's been nagging at me for a while. When I use JavaScript libraries and APIs such as JQGrid or Google Maps, I tend to find myself creating server side libraries to render the JavaScript for me. For example I might have:               $map->setZoom(10);     $map->setDimensions(200,250);      in PHP, which would internally render the relevant JS when I call `$map->render();`, for example. This means I can easily generate JavaScript based on the state of my applications. I also find it easier to work with the data I already have in my controllers etc. Is this a suitable way of using common functionality within a JavaScript library or would it be better to write JS as standard?


title: How do I link an domain object in memory to its database records without cluttering the domain with database concerns?

text: Your domain model contains a set of objects. I'm here presenting a side project, but I have a much more complicated work project falling to its knees because I didn't do a good separation of the database and the domain. In this case, the object is called a CyclingRecord. Following Onion Architecture, the domain objects know nothing of their persistence. However, each one of those objects corresponds to an entry in a datastore (potentially a database, potentially a file). The row ID is absolutely not part of the domain object and therefore has no business being stored in the domain object.               data CyclingRecord = CyclingRecord { date :: Day,                                          distance :: Float,                                          time :: Integer,                                          description :: Maybe String }      In a language that enforces strong immutability (such as Haskell and Clojure), identity and value are synonymous. Further, there is no reason why you could not record more than a single ride in a day. So, the entire record completely describes a ride. So, if I edit a record in the Domain, when I pass the edited objects back to the Database Infrastructure, how do I go about notifying the database that it needs to update a particular record instead of deleting an existing record? (the same idea would need to be extensible so that I can have an application potentially manipulate many records at once and then send them all back to the database. Offline operation or syncing or just avoiding excessive disk activity) Unless the correct answer is to actually make something like a unique identifier for each ride. Perhaps a UUID. Perhaps add a "day counter" to the record. Make it intrinsically part of a bike ride and then have the database depend on it instead of a separate row ID.


title: Do you have to rename the software when you fork a repo?

text: I forked a repo some time ago and created a few pull requests which went unanswered. Now, the software is MIT-licensed, and I kept the copyright notice there. Do I have to rename the software, or whoever forks a repo can keep referring to it by the same name? Thanks!


title: How do I keep an eye on a remote freelancer?

text: I've been hiring several developers from different places around the world. It all goes well, but I see that some of them are abusing my polite overlooking too much lately. They are all hired for a full-day. However, I see that after 5 hours in a day, not much has been done. I am considering to develop a software that will take a screenshot of the computer screen every 1-5 minutes and upload it to my system. However, this is going to the extremes. How do people usually manage remote developers?


title: Eliminating Dependencies vs Eliminating Redundancy

text: Upon my assignment to a project, I discovered that many message classes were received and then kept intact and passed around inside the receiving application. When these messages changed, code throughout the entire application had to be changed. Since this problem, I have gotten into the habit of converting messages to a new format upon reception. However, it feels like I am directly violating DRY (don't repeat yourself): I have these near-identical internal classes that I create from external messages. Where is the line between eliminating dependencies and eliminating redundancy? Should each module have their own data formats?


title: How to start to gain experience of managing a project

text: There are some job requirements of project management experience for a programmer, such as: > the candidate has to have some experience managing a project, not > necessarily with subordinates, but rather having worked on a project all the > way from design down to test. I was wondering   1. what "subordinates" mean here?   2. if there are some books, webpages or elsewhere with both **general guideline** and **simple practical sample projects** to help one get some basics about the whole process of a project. I am particularly interested in projects for both Linux and Windows, in C, C++, Python, Java. I am considering to start by playing on my own, not eager to find a company yet. My major was not CS, so I might lack the basics.


title: Is a startup revolving around a web app still viable?

text: I have an idea for a startup that revolves around a web app. I plan to incorporate a mobile app in the future but, unlike something like instagram, users will be more likely to access with a desktop computer. I am learning Ruby On Rails currently but wonder if, starting in the 4th quarter of 2012, I am focusing on a technology (web development) that is becoming obsolete. Should I dump the idea for something that revolves around mobile technologies and spend my time learning something like iOS development instead?


title: How to render graphical interface automatically (behind the scenes)

text: I am trying to write a program that shows images of a Java application's GUI automatically (ie, without someone building, running, and then taking screenshots of the interface). I know WindowBuilder is a GUI designer with a WYSIWYG editor but that isn't quite what I want. For example, if given the source code (or jar) of an application as input, which has 4 frames (windows), then my tool would output 4 images of the different frames. It only needs to work on primitive and simple interfaces. Any ideas on how to go about this? **EDIT:** I would like to build this into an Eclipse plug-in that provides information to the developer about the GUI. There are plenty of plug-ins for showing the call graph in various ways, it would be neat to show a graph of the frames.


title: Should an object know its own ID?

text: `obj.id` seems fairly common and also seems to fall within the range of something an object could know about itself. I find myself asking why should my object know its own id? It doesn't seem to have a reason to have it? One of the main reason for it existing is retrieve it, and so my **repositories** need to know it, and thus use it for database interaction. I also once encountered a problem where I wanted to serialize an object to JSON for a RESTful API where the id did not seem to fit in the payload, but only the URI and including it in the object made that more difficult. Should an object know it's own id? why or why not? _update_ : **Terms**   1. id: Identifier attribute on an object. in database terms, a surrogate key not a natural key.   2. Object: an Entity, or otherwise uniquely identifiable object within the system.


title: is there any way to copy the "Work Item Type" diagram in TFS?

text: I used the Process Editor (from TFS Power Tools) to update the **Workflow diagram** of a particular Work Item Type (viz., the "Issue" type). There are a dozen other projects on our server that share the Issue type, and I would like to port my changes to all of them. But unfortunately, while the Process Editor allows you to export/import Work Item Types to/from the server, it only includes the`.xml` (definition) file, which doesn't include the workflow diagram. (The diagram is stored in the`.wit` and the`.wit.diagram` files, which do not get imported with the`.xml`). Is there any way to copy the diagram to all the projects? (Note: I eventually intend to make similar changes to several of the work item types, so an automated solution to propagate these changes across all the projects would be much appreciated!) Running TFS 2010.


title: Is it possible to reach absolute zero bug state for large scale software?

text: I am talking about 20-30+ millions lines of code, software at the scale and complexity of Autodesk Maya for example. If you freeze the development as long as it needs to be, can you actually fix all the bugs until there is simply not a single bug, if such a thing could be verified by computers? What are the arguments for and against the existence of a bug-free system? Because there is some notion that every fix you make creates more bugs, but I don't think that's true. EDIT: By bugs I meant from the simplest typos in the UI, to more serious preventative bugs that has no workaround. For example a particular scripting function calculates normals incorrectly. Also even when there are workarounds, the problem still has to be fixed. So you could say you can do this particular thing manually instead of using the provided function but that function still has to be fixed.


title: What Specifications should a Programmer Seek in a Computer Purchase ? Or, What Computer should I buy?

text: I wish to acquire a new computer that is specially designed for programming. I would like to build it myself for the learning experience, but am willing to purchase it made as well. Basically I have downloaded so many files dedicated to programming that are so large that a) my computer is near capacity and b) my 4 year old computer is extremely slow. Specifically, I am into databases (Oracle/PostGreSQL, Mongo, Hadoop) and java, but love learning all possible languages.


title: Is there an equivalent term for Desktop Monitoring Recorder such as NVR or DVR?

text: Just like NVR (Network Video Recorder) and DVR (Digital Video Recorder), I was wondering if there's a term / acronym for Desktop Monitoring Recorder? Perhaps DMR? I can't find any standard terms for this type of system. I'm writing a system which is just like an NVR but records / monitors computer desktops instead. It's not a "screen thief" or "desktop spy" or any type of malware - it's a surveillance system, only for computers rather than cameras. In the end, it will do things such as primarily monitoring/recording screens, watching for mouse movement when the computer user shouldn't be there, and more. There are also other commands such as taking control of the screen, executing remote shutdown / restart, posting messages to the user's screen, and more. Is there a particular standard term or acronym for the recording software side of this?


title: 65.000.000.000 tests to run

text: I was asked about how to run a suite of 65.000.000.000 tests and I wonder if it is normal to have a project with such a huge amount of tests. Have you worked in projects with this characteristic?


title: Tools that can catch "fake coverage"?

text: Hypothetical scenario: codebase is exercised by unit tests run by a TeamCity build-bot, that also uses the built-in dotCover tool to provide coverage metrics. The build will fail if less than X% of the code is covered. Unscrupulous developer running NCrunch (or a pre-tested commit in TC) sees that his next checkin will drop the coverage percentage below the threshold and break the build, because he didn't write good unit tests (TDD or otherwise). So, he writes a new test that runs some lines of code that NCrunch shows aren't covered, but makes no assertions about their behavior. Tests pass by default (because the executed code throws no exceptions), coverage stays above X%, and to find the problem, someone must discover the test, inspect it and see there are no assertions (or no meaningful assertions) made during its execution. Since we currently don't have a code review process, and it would be detrimental to productivity to perform reviews prior to every commit, I want this behavior to break the build. If the test runner runs a method marked with a [Test] attribute (we're using NUnit) and, upon completion, sees that the code has made no calls to NUnit's Assert methods, nor thrown the ExpectedException, TC should raise Cain. Ideally, the tool would be smart enough to also discover that all assertions will be true by definition, such as `Assert.AreEqual(1,1);`, and fail the build in a similar way. Is there something "off-the-shelf" that I can plug into TeamCity, or a way I can configure its built-in runners/coverage metrics to find this type of bad behavior, short of performing a custom static code analysis? Of course we'll find it _eventually_ , but in our environment (small in-house dev team) there may only be one or two developers familiar with the full codebase of a given application, and so this blatant end run around test quality checks may not happen until the guy responsible is long gone and someone else takes over primary ownership of the codebase.


title: Versioning and deploying dependent systems

text: I need some best practices or experiences of developer teams who had to treat the same issues I have at the moment =) Our company is developing a client software for years. The one and only dependency was to have an appropriate database. With each release (update) we also update (incremental) the database if necessary. The versioning schema is well-established and matches our ideology. Now we have started developing mobile applications (act as external client). Some preliminary remarks to our architecture: The interface between the mobile client and the database (same database as for the desktop client) is a RESTful webservice. The versioning of both clients are independent. One application is maintained by the desktop development team and the mobile part is maintained by another team. But I don't know how to handle the webservice. Should it be independent as well (own versioning) despite the fact that it's using a lot of shared libraries which are maintained by the desktop development team? How it works:   The mobile client synchronizes it's reference data with the webservice which interacts live with the database (read-only access to database). User data which are produced on the mobile application become also synchronized with the webservice but it's written to some persistent temporary tables. And an asynchronous job will be started to try the import to the database (could fail in case of locking issues, permissions, ....). If the import fails the same import procedure can also be started on the desktop client (they use the same library for importing from temporary tables to the specific ones) In general each of these three parts could change (e.g. bugfix, features, performance improvements) without affecting the other two. Therefore I need a strategy to deploy each by itself. Nevertheless most probably it will affect two of three. Where / when should i check if all three systems are compatible? How should I check this? Having a table in the database with every single possible combination of version which work together? If you don't understand my question because it's entirely ambiguous, please let me know. It's not that easy to describe =)


title: Anyone experienced in Gaming/Gambling industry?

text: Are there any legal hassles when you work in these Casino kinds of industry? I'm offered a job and I like it owing to clever algorithms and multi-threaded enviornment. I'd like some advice on legal issues before taking the offer. *Ok I'm not going to sue any one of you for bad advice. I just wanted to know if people have any experience in such affairs. And I'm not looking for a lawyer's advise at all, I'm trying to know the gaming industry trends in general and what the programmers there have to say about their work when it comes to gamblings. And how would the lawyer know what goes inside the casino programming industry? *


title: Changing OS parameters from Java source code

text: Can I design my program so that it will automatically change OS's hotkeys parameters? I mean, when installing a program, it will set the hotkey of OS so that if you press them, the program itself would run. (Linux/Windows)


title: Where does `this` go in a x64 thiscall?

text: So I understand that `thiscall` doesn't really exist in x64 programming. However, I can't really find any definitive explanation as to _where_ the `this` pointer is put to be passed to the callee. Is a x64 `thiscall` like a true `cdecl` call, where `this` is put on to the 'stack' last (on both GCC and MSVC compilers)? **EDIT:** Running through GDB, it appears so. `rdi` held the `this` pointer and `rsi` held the one parameter that particular method had. Is this how it always works?


title: What special considerations are needed when designing databases to hold financial records?

text: I hope this question isn't too broad. In the future I may need to add some accounting and financial-tracking systems to some applications (mostly web- based applications, but my questions pertains to desktop apps as well). Now, creating a simple record of financial transactions is theoretically easy. One database table with a few columns could do the job. Even MS Access, Excel, or even just a plain ASCII text file could be used to store transaction dates, account IDs, and dollar amounts. However, I feel that even a frequently backed-up SQL table with transactional integrity might not be robust enough for serious financial tracking. I hear terms like "double-entry accounting", and I get the feeling that most financial tracking apps (for example, Mint.com, or GnuCash) have a much more complicated data structure or process in place to make double-sure that everything adds up perfectly, exactly as it should, and that no data is ever lost or corrupted. My question is: **When designing an app to track financial transactions, what special design considerations should be made?** It seems like there could be so many potential issues... issues with rounding precision, parity checks, some kind of audit process, special backups, security/encryption, extra ways to protect data in the case of a crash mid data-entry.... I don't really know what I should be asking specifically, but I get the feeling that the programming industry has a set of best practices I know nothing about. What are they? **Edit:** It looks like I opened a bigger can of worms than I expected. To clarify, I'm thinking specifically of two types of apps:   1. "Check registry"-type apps like GnuCash or Quicken that maintain a record of an individuals transactions for their own use.   2. Apps that track invoicing/credit/or "points" for vendors and customers that deal with a company. I probably will not be doing any direct banking or (AFAIK) anything that has a ton of finance-related government regulations attached to it.


title: Linking a modular option to a program without creating a dependence

text: I would like to make my programs much less of a hassle to extend or create, I am imagining a scenario where the end user has a variety of check box options that affect how the program interacts. Something like in a word processor where you say underline, or bold, or to a game where you say, include this feature exclude that one. Just options in general. How does one create dynamic options that modify the programs behavior without making the program dependent on that feature should one decide to remove that option completely? And what is this type of programming called? Does one use global variables, (despite some languages suggesting otherwise) I guess maybe an alternative (metaphorical) way to form this question would be: How do I make my code look more like lego blocks and less like one of those wooden three dimensional puzzles? Example you can use: Deck of cards, options to remove all the jacks, or all the kings.


title: How can you design a application when you have not imagined completely how the app look like?

text: Here is the problem, an enthusiastic man wants to build an app, however he only knows roughly how the app should work. There are a lot of details he didn't know. How does he design his app? -Option1: Do not design, but just code the most important first & test to see how it goes then modify gradually. After the highest priority function finished, he can move to the next priority function. Bottom-up Approach. -Option2: Keep thinking until he realized all the details then design a complete app before actually coding. Top-down Approach. -Option3 Combine of both option1 &2, ie he can design some basic function first then start coding even he didn't realise all detail then modify accordingly. It's very hard to know all the details right at the beginning cos we are human & we can't predict the future. So i vote for option1 or 3. But it's kind of painful if you has to change ur code if you're missing the details. A lot of things has to be changed. My instructor in university say he always prefers top-down approach cos he believed it better. However, i think build a software just like u live a life, you never know in advanced what will happen in the future, so option1,3 could be the better one. What is your solution?


title: Making a sldprt to PDB file converter?

text: I wanted to create a parser that can read a solidworks file and turn it into a protein data bank file. This has already been done in a program called DiamondCAD. http://www.zyvex.com/Research/DiamondCAD.html I waant to make a parser that can parse the data and then visualize it the same way as DiamondCAD. I have downloaded and opened solidworks files before and they make no sense to me with never before seen symbols and looks like ancient writing. Does anyone know how a sldprt. file is structured and how it can be parsed into a PDB file? (A software called VMD converts a PDB to Obj. file so it is proof of concept)


title: Is Spring Source Tool suite required for J2EE application development?

text: I am following a tutorial. The guy keeps on adding different plug-ins such as subclipse, maven, spring source tool suite, etc after setting up jdk, eclipse, tomcat. While installing spring, he was saying that spring makes it difficult to debug the programme. That didn't make me happy. He also added, it's up to you if you want to install it. Since I am not familiar with it, I just want to know if it's alright to not to have spring at all? Is there really any use of having all those plug-ins?


title: What is the lifecycle for loading a Linux Desktop Environment?

text: I'm looking into delving into a bit of custom OS work (and yes I understand that doing any development at the DE level or lower on an OS is extremely complex and not a light thing to undertake, curiosity is driving this though), I'm in the research phase right now, digging around and learning by example from the source code for projects like GNOME, KDE and XFCE. I can't seem to find a really good resource, or resources that describes how a "desktop environment" is initialized, instantiated and drawn to the screen of the user (i.e. it's lifecycle). I know that Xorg/X11 sits in there somewhere, acting as server and the users screen is the client, and your desktop sits on top of this client. A lot of resources just start talking about rearranging combinations of already developed window managers, apps and such in order to customize your desktop experience, but what I'm thinking is what If I wanted a stripped down OS that only consisted of a screen with three buttons that performed some actions and that was it? I don't need window management, applications, or other GUI items, just the ability to draw a desktop and three buttons... (hypothetical) My problem is at the distro level, how does a DE get registered as an available desktop environment, how is it strapped into the distros boot up, what happens after the login, what's run, what is the topography of a DE? By example, in Ubuntu you can have KDE, XFCE and GNOME installed on one distro and switch between them by logging out, changing the active DE and logging back in so how does the DE make the OS aware of its existence in the first place? I only really need high level here really, I want to do something fairly simple in that I want to make a DE available in a distro like Ubuntu Desktop (not openly, I mean just for myself) and initialize to an empty desktop (no taskbar, apps, window manager, etc...; just the most base state possible) in order to understand what's required to get a DE running. I don't need code specific answers (where's the challenge in that right?) but pointers to good resources on how this process works. I'll take a well formed textual answer over a chunk of code as I'm looking to understand how it all works, the path taken to get to a DE and not implementation specifics. The outcome of this will not technically be published (code-wise) but I'm looking at doing some blog posts that describe the process of learning all of this and writing the DE layer in order to get a "Raw" desktop up and running in a pre-existing/established OS like Ubuntu, Mint, Gentoo or another distro.


title: How to properly deal with ER and UML diagram management

text: When learning about these tools, I (naively) thought that mapping about the business space could be front loaded by doing it only once and refering to those diagrams for each project within a single business unit. However, I am finding that each situation is calling for it's own set of diagrams to properly communicate what's going on. I find that I am dealing with the same objects, but the relationships change. My first thought to these different situations was that these were sort of _disposable_ * diagrams as they only pertain to a very narrow scope within the business, but I quickly retracted that thought once I found myself scrambling to find the same ER diagram I disposed 3 months ago in a completely different situation. So now I am getting a sence that they are not disposable and should be kept, but I want to avoid just a stack of seemingly contradicting UML and ER diagrams so that someone behind me can make sense of it all. Any suggestions?


title: Desktop framework with rich HTML/CSS interface and strange 'desktop native language support'

text: I'm not sure if what I'm after even exists or if it doe's im looking for the wrong thing. I'm after a framework/application/SDK that allows me to build a desktop application with a HTML/CSS/JavaScript based interface yet still allow for more complex OS interaction with a programming language such as Python (im also familiar with Ruby but as this is a hobby project I don't mind looking into other languages if needed). By complex OS interaction I mean more than simply saving files to the HDD, being able to use pythons libraries would be a big bonus. The closet thing I can find so far is tideSDK http://www.tidesdk.org but it doesn't seem to offer much past its own API for OS interaction.


title: Cross platform or web development with .NET

text: With iOS and Android soaring on mobile devices that become ever more pervasive, every other year being the 'year of Linux on the desktop' - which is somewhat snarky, but they are getting there -, OSX still holding its own, the time when one could simply say "it runs on Windows, and if you're not using Windows, well, sucks to be you". I'm a .NET developer, with the applications i'm developing being fairly service-oriented, so that I can easily expose the backend logic to different frontends cross platform. I'm really bad at user interfaces, but in the end, applications do need to end up with an end user. And to present the application to the end user, it needs a GUI. It was looking like XAML/WPF was the land of bounty, where they weren't quite there yet, but were aiming to make a cross platform presentation layer. Lately, it has been mighty quiet on the WPF front though. Silverlight is all but dead. I sort of half hope that the 'right thing' will be happening here, with some black magic, pixiedust and flying unicorns that poop rainbows transforming my code + XAML into HTML5/CSS3 applications, winforms, metro, or whatever other form I choose to build for. This might be a bit optimistic. So what presentation forms should I be looking in to? I would like to continue to use .NET as a primary ecosystem. Should I just be going asp.net + html5, and do the front end by hand in html5/js/css? Is there any framework that looks like it will hold the promise to be able to do something in a somewhat unified language?


title: GPLv3 Project with BSD Library

text: I am working in a Python project that I want to release under the GPL3 license. This project has one file that uses the BSD lxml library . I really need to put reference of the BSD license in the file where I use the library? Or just the GPLv3 of my project covers the licenses restrictions. Library: http://lxml.de Licenses: https://github.com/lxml/lxml/blob/master/doc/licenses/BSD.txt http://www.gnu.org/licenses/gpl.txt [Edit] I think we're misunderstanding I will not put the source code of the lxml library on my project. I will put the reference for functions of the library. If someone wants use my project, he needs to download separately the lxml library.               import lxml          # do stuff with lxml...     # do stuff     # my code      Only is necessary put the library license if I distribute the lxml source code with my project. Am I right?


title: Generic way of handling exceptions in windows phone?

text: I mean what are some of the ways other programmers deal with exception for example, when an error occurs when accessing a web service for say. If an example cant be given for windows phone, give the closest you could.


title: Application name licensing issue

text: I started writing an application for Windows Phone marketplace, at the time only making sure that the name I gave it wasn't being used by any other app on the marketplace. I just found out that the same name is being used by a, seemingly popular, SourceForge project. Is this a problem? I haven't released my app yet so I could rename it, but I really like the name and would prefer not to unless it is an issue.


title: Segregating interfaces/concerns to a tree

text: When working with a single object there are a number of ways to segregate interfaces to it.   * Breaking it into smaller components that can be treated independently.   * Breaking it into simpler interfaces.  Both of these seem challenging to do with a tree. I think it would be nice to be able to do the following.               class Node : INodeData, INodePresentation { ... }          class Program     {         static void Main()         {             var node = new Node();             ManipulateNode(node);             PresentNode(node);         }              void ManipulateNode(INodeData nodeData)         {             foreach (INodeData child in nodeData.GetChildren())                  nodeData.AddVertices(...);             nodeData.Rotate(...);         }              void PresentNode(INodePresentation nodePresentation)         {             nodePresentation.Color = Color.Blue;             nodePresentation.Size = 15;             nodePresentation.Paint();             foreach (INodePresentation child in nodePresentation.GetChildren())                 PresentNode(child);         }     }      In this way different parts of the program could use the node according to a concise interface. But each interface I add will require more methods in the Node class which could be unmaintainable. It seems like the presentation and data should be defined in separate classes, but I can't think of a good way to do this while maintaining the ability to traverse the tree. Any suggestions?


title: Tracking correct order details in commerce database when modifying 'products'

text: I am implementing an ecommerce database. This is slightly different than most as the 'products' that are for sale are for services provided. For example a user (vendor) of the system may define a service to 'wash your car'.               Table: Services     --------------------------------------------------     | ID (pk) |      Title       |    Description    |     --------------------------------------------------          1       Home Services      wash your car      I have omitted a number of columns, but should still be able to make my point. A client can then purchase the `Home Services`. So I have an `orders` table with a FK to the the `Services` table. Standard ecommerce stuff. The issue I have is what happens if the vendor decides to slightly update the description or even the title? This may have the affect of changing the entire service. For a normal commerce site, you'd add a discrete product. If this product changed, you would create a new product and discontinue the old one. With the packages, we need to allow updates as the description is the product and the sales pitch (maybe thats my problem though - maybe separate the two?) so I have to allow changes. For example they could change the description to 'wash your car and clean your house'. The obvious issue with this is that existing orders will still reference the same PK on the services table but the service is now different. I'm wondering what the best solution is to allow changes to be added, but maintain the correct data for existing orders. One solution I thought of is to not update the row, but add a new one and a version number               Table: Services     ------------------------------------------------------------------------------     | ID (pk) |      Title       |            Description             |  Version |     ------------------------------------------------------------------------------          1       Home Services     wash your car                           1          2       Home Services     wash your car and clear your house      2      We can now access the correct information for previous orders, and existing customers can purchase the new home services option. This feels like a sensible way to do it, but want to see if anyone knew of any other solutions? One other solution is to allow updates on the services table, but then for each order, save the description and title (similar to how sometimes in commerce schemas the final price is saved directly to the order). Issue I have with this is a lot of duplicate data being saved.


title: Interview advice - Google Developer Advocate position

text: Can this position (Developer Advocate) be considered as a Software Engineering position in terms of interview questions they will likely ask me? Anyone else been interviewed for this position? I am just trying to gauge what they'll ask me for Developer Advocate position. Thanks. **EDIT:** This is just the first phone interview.


title: What is the ideal mix of senior to junior developers on a team?

text: On any team, you are going to have the need for more grizzled and grey developers and some young pups. Some reasons include:   * Money. There are often tasks that don't require the same level of experience to deliver, so it makes sense not to pay top dollar to have those tasks fulfilled.   * Energy. There's an energy and enthusiasm that new people can bring to a team that stops it from getting too stale and set in its ways. There's also calmness and wisdom that the more senior people can bring.   * Knowledge transfer and career growth. Both in terms of the project and skills, it's useful and often fun to teach people and to learn new stuff. It's satisfying to help "bring on" new team members. I realise there are some cutting edge projects where it may be important for there to be more senior people than junior, but in general, is there an ideal mix of experiences on a team, or is it totally dependent on the project?


title: Can I distribute software that's using Microsoft's Visual Basic 2010 Express Edition?

text: Am I within my rights to write and distribute software in compiled and source form using, in part, Microsoft's Visual Basic 2010 Express Edition? I have only the free, express version. If it has anything to do with this, the license I am using is the CC BY-NC-SA 3.0 license.


title: Is there a way to input values on a web site's text box using a database table values?

text: I have a table with username and passwords that I want to input in Hotmail's username and password box. Is there a way to actually program this? Are you allowed to manipulate text boxes of someone else's webpage? Not for illegal purposes, just to make my job easier and to not have to input values manually one by one. Hotmail is just an example.


title: What license is applicable for an app based on CodeIgniter?

text: I am trying to fork an application that is based on CodeIgniter. According to the GoogleCode page, the license is GPLv3. However, examining the license.txt file inside the root directory of the application is very clearly not GPL (it does not include the preamble etc.) and looks like a slightly modified version of the BSD License specifying that a copy of the license and all copyrights must be included with a changelog, as well as some indemnity clauses. The confusing part is that within several of the actual php files they include another license in the comments. This license is a verbatim copy of the 2-clause BSD license, but below this BSD license there is a series of @tags, and the @license one has a link to the GPL 2.0 so it is unclear to me what license applies to this application. Finally, I have found no mention anywhere that the project is dual/multi-licensed. Also, the project has not been under active development for over 2 years. Can anyone shed any light on this (or point me in the direction of resources that could)? Thanks.


title: What's your favorite interview question?

text: What question have you found especially valuable in interviewing software developers? What is it about the question that has made it particularly useful? I'm looking for a particular question you like to ask, not just an interviewing approach like "make them write code".


title: Release/Change management - best aproach

text: I asked this question an year ago in StackOverflow and never got a good answer. Since Programmers seems to be a better place to ask it, I'll give it a try... What is the better way to work with release management? More specifically what would be the best way to release packages? For example, assuming that you have a relatively stable system, a good quality assurance process (QA), etc. How do you prefer to release new versions? Let's assume that we are talking about a mid to large "centralized" web system (no clients), in-house development. This system can be considered "vital" for a corporate operations. I have a tendency to prefer to do this by releasing packets at regular intervals, not greater than 1 to 3 months. During this period, I will include into the package,fixes and improvements and make the implementation in production environment only once. But I've seen some people who prefer to place small changes in production, but with a greater frequency. The claim of these people is that by doing so, it is easier to identify bugs that have gone through the process of QA: in a package with 10 changes and another with only 1, it is much easier to know what caused the problem in the package with just one change... What is the opinion came from you?


title: How to manage scope creep?

text: We often receive last minute requests from the business asking for an extra feature to be implemented. The project manager is usually responsible for filtering out these requests as "must haves" or "nice to have", but there are cases where the business wants to squeeze all these features into a release. Is there a good way to say NO to the business? What steps can be taken to stop or minimize scope creep?


title: Is there a standard way to structure a website

text: When I first taught myself how to make websites (html/css) I used exact pixel width and height for all div elements. I've also practiced making websites with nothing but percentage width and height. I can use either technique fairly easily, but I wanted to know is there a standard technique or structure to building the basic layout of a website? My recent favorite is to make my main div container an exact pixel width with auto height (centered on the page) and then have all divs inside set to a percentage width and auto height. This works just fine for me, but if there's a widely acknowledged standard to making a website from scratch I would love to know.


title: Is it a right thing to do, to use Node.JS as a TCP Server?

text: **Part I - The Story:** I have crafted a high performance TCP server in `C#` (based on _SocketAsyncEventArgs_) which works brilliantly (for my cause). I have more than 7000 clients, sending me a message every 30 sec - 1 min. In the past days I was studying **_Node.JS_** (for another, totally unrelated project) and I have learnt that _Node.JS_ could be used as a TCP server. So I thought: "Heh...Let's see if it can compete with my 'state of the art' TCP server". And it was astonishing how Node.JS was (is) more performant (in some cases far more performant) than that "state of the art TCP server" and was far simpler and used far less resources. **Part II - The Question:** Is it right to use Node.JS just for implementing a TCP server and not a web app? Does that considered as abusing Node.JS? And if anybody had did that what were the pros and cons in the long run? Note (an important one): I have not implemented the message parsing part in Node.JS yet. So I must find a performant way to implement heavy-lifting in an async manner.


title: Automated builds, build tools and Embedded systems

text: I come from an embedded world where we use C/C++ for programming, and use an IDE to generate a binary file, which is then programmed into a Hardware Board, which can then be tested. With this background, can someone point me to a sample workflow for automated builds, which has demonstrable advantages over the current workflow of -build(using IDE)->Flash into the hardware->test. In other words, is there a way I can benefit from the advantages of CI in the domain that I operate in?


title: Evaluate all pair combinations in an array for a condition in n log n time complexity

text: Task - Consider an array of n elements. Count the number of pairs that satisfy condition X (sum of the two elements < an arbitrary number, k) . The basic approach I could think of would be O(n^2), where I evaluate all n*(n-1)/2 pairs. How can I solve the problem in a better time frame i.e., O(n log n) or less? The best approach so far was to sort the array, find where a+b smaller than k then add indice of a to solution. But the process still has to go through n-1 'b's to check for each of them. It's better but still doesn't improve the worst case. Also, this isn't homework. I came across this while preparing for a competition.


title: Are there established algorithms for spacing out objects of unequal size?

text: I'm working on visualizing a hierarchy. There will be clusters of objects, each cluster containing rectangles of fixed width but variable height. I'd like to arrange these within a rectangular space so as to have equal visual spacing between them, something like this: ![mockup](http://i.stack.imgur.com/SapuH.png) download bmml source - Wireframes created with Balsamiq Mockups Before I spend a day inventing the wheel, are there standard algorithms for this kind of distribution and space-filling? If the objects were all the same size, I'd just use a grid. I'll be using this algorithm at two levels: once to lay out the clusters, and again to lay out the objects within each cluster. The latter would look best if they were arranged within a roughly circular space, but if that complicates things excessively I'm OK with rectangular. I won't be showing relationships between these objects, so distance minimization is not necessary. There's a similar question (What would be the best way to fill "space" in an User Interface for irregular image sizes gallery?) about laying out rectangular images while eliminating or minimizing white space. In my case, I want to equalize white space, clusters will be circular, and some clusters will be much larger than others.


title: why is remainder of division, multiplied by divisor ? using operator %

text: I have started to learn Javascript. From book http://eloquentjavascript.net: > There is one more arithmetic operator which is probably less familiar to > you. The `%` symbol is used to represent the remainder operation. `X % Y` is > the remainder of dividing `X` by `Y`. For example `314 % 100` is `14`, `10 % > 3` is `1`, and `144 % 12` is `0`. Remainder has the same precedence as > multiplication and division. I don't understand, why it multiply the remainder fraction by divisor (after division). It is more complicated or less accurate.   10 / 3 = 3.3333 (a recurring decimal number). 10 % 3 = 1 (0.333 * 3 = 0.999 (not 1 ) What is purpose of this strange remainders ? Thanks


title: What issues tend to arise when working with HL7 messages?

text: I'm testing a product for health care businesses, and we're working with HL7 messages. I saw people groaning on another question about the issues with HL7 but not mentioning specifics. Can someone give me some ideas of what issues or classes of problems we should specifically be looking for? We are using some well-used libraries for the parsing. If specifics about these or what we're doing would be helpful please let me know in the comments and I'll add to the question if I can.


title: Which programming languages are multi-platform, fast, and object-oriented with non-limiting low-level os access?

text: I've been a web developer for a few years, and I want to get into desktop program development. I'm looking for a language that will allow me to write programs which are:   * Multi-platform, supporting Windows, Mac, and Linux, either by default or with little work.   * Create programs which are fast.   * Is object oriented.   * Doesn't have any limitations in terms of what sort of programs can be built with it (e.g, can be used to access lower level operating system functions, e.g showing an icon in the taskbar or rebooting the computer)   * (Bonus but not necessary) Has some tool for GUI creation   * (Bonus but not necessary) Comes by default with tools for database access such as with MySQL or SQLite I'm on Linux, and would prefer not to use C# as there's no good IDE for it available on Linux. However if its the best choice, I may be convinced to switch for it. Thanks in advance.


title: Is it worthwile to learn/use Play framework (for Scala or Java) if I don't use the MVC in it

text: I prefer Single Page Application to server side generated HTML. I am sensible to the pitch of "high productivity" delivered by Play. Now if I don't use the HTML generation part, is it still valuable? Is it worthwile to learn it? For the controller (REST or other), business logic, persistence. Does it help generating unit tests? How do you use it? Thank you


title: Intranet application platform decisions wamp vs node

text: I have a client/server java application with a firebirdsql backend. This is a pain because I have to install java and the client on every workstation, etc So it is now time to rewrite the application, and I am deciding what technology to use. My strengths are php/js/C# The application can be single user or multiuser (I don't however want to force the users to install a full multiuser database service if possible) It needs to work off-grid (some of the locations it will be used have no internet access) It will primarily be deployed on windows desktop pc's and accessed remotely via ipads/laptops. I would like to be able to run the whole app off a usb key, with no installation required. My initial thoughts are just a wamp stack, although I am not sure how easy it will be to bundle it into an easily deployable application. I also need to have a background task running "aka cronjob", and I am not sure how to trigger that from within the application itself short of writing a windows service. My second thought is to look at node+database (which database I am not sure, preferably embedded or standalone). The good thing i see here is that i can handle "cronjob type" tasks relatively easily. The bit where i am stuck is in the database choice. I have looked at sqlite, but the drivers don't seem all that robust. So 3 questions really.   1. what is a good embedded/standalone (non-server) relational databases that can be used with node.    2. has anyone got experience doing a similar project, and any issues they encountered with either node or wamp stacks   3. Are there better technology stacks I could use in this scenario I for one have found that WAMP performs terribly over the network but flies on localhost, and I haven't been able to determine the problem.


title: “/*@null@*//*@out@*/” in C function declaration

text: In `alloc.h` of djbdns-1.05 there's the following code: > `extern /*@null@*//*@out@*/char *alloc();` My question is about the goofy-looking `/*@null@*//*@out*` “decorator.” I assume this is “just a comment” with some significance to djbdns's build system. But I can't find anything referencing it in other files. Anybody know what this is?


title: Technical test for a senior developer

text: I have a dilemma. I have a candidate for a senior software developer position. The guy seems competent on a first talk with him and he answered the questions asked precisely and gave me proofs of his work. Moreover he has been highly recommended by some trusted colleagues. In this case I am tempted to skip the technical test HR requires as I need to fill the vacancy asap. Please share your experience. **EDIT:** Against a better judgement I have given the test. Top scores on almost all questions, even on subject that he did not boasted upon. But I had so support some irony from him when he saw the questions of the test - which were clearly not for a senior. So we made an offer. Thanks all for the insights.


title: Do testers have to look at source code?

text: How necessary is it for testers to do white-box testing in addition to black- box testing? As a developer, I see value in having a QA-minded person go through my code and look for weak points, but it also seems like if a non- technical tester is thorough and methodical enough, they can cover the application well. White box testing may reveal important test cases that wouldn't be obvious while looking only at the application from a user's perspective, but exclusively black-box testing might take less time, and significantly increases the number of people who are capable of doing the job. Also, a nontrivial amount of white box testing should be performed by the developer before it ever gets to the tester, am I right?


title: How to best structure Git for our team

text: We're starting to develop many small web projects in our company, where mostly they will have one shared resource with some code pieces (SDKs, utilities and etc...) Our team is small (~5) but is growing and is expected to grow x2-x3 in several months. We're discussing what would be the right way to build our source control and came up with 2 main ideas:   1. Put all code in one repo which will be synced with Github. Everyone will have the copy of all projects and will have the shared resources folder as well - thus will be able to pull/push the shared code and the project code with only one action. Also, there will be no need to follow multiple repositories. On the other side, this might create confusion and errors - as all the code pulled/pushed even if working only on one project.   2. Put each project in its own repo and put the shared resources project in its own repo. Thus everyone who is working on a project will work only on that repo and won't have to push / pull other repos. This will create a more streamlined work - but will make everyone work with at least 2 repositories (shared resources and his project), which might create confusion. I would be glad to know if one of the options is a bad idea or if there is a better way. Thanks!


title: Searching for job openings beyond those that just specific programming language?

text: I currently consider myself to be a X language programmer (just using a variable here since this isn't about the language), I've invested time into learning the platform and like working with it. The other day, something dawned on me a bit in that when I go to search for openings (say on a job search engine), I would normall just type in "X language" "my city" and look through those. However, I got to thinking that I also have experience working with cloud infrastructure, for example, and maybe there are companies out there that want someone with cloud experience but who aren't yet decided on a specific language / platform so they could have sort of "open ended" listings that don't mention "X language" even though they may be open to using it if they found the right developer who wanted to work on that platform. I've been trying this method of looking for openings and have found a few so far that seem to fit what I was thinking (that they didn't mention specific languages or did so in a way that seemed non-commital / open-ended), I'm just curious what other's experiences are as to whether there are a number of companies out there that may do this where they are looking for a developer who can build a specific application rather than necessarily having already decided (and listed) the platform they use. The current job I found was where the guy called me and I ended up influencing the platform we use (since it was a greenfield project) so it just makes me wonder sometimes if I am not being open enough when I search. **Clarification:** I think the reason that I am asking this is because when dealing with recruiters they tend to obsessively focus on the language first and foremost, so if I say that I have primary experience in X platform and they want Y then they usually just assume its not a fit and tell you that they will let you know when they have X jobs available


title: Mary Poppendieck's Books on Lean Software Development: Which One Can You Recommend?

text: Has anyone read all three of Mary Poppendieck's books on Lean Software Development? She and her husband Tom wrote:   * in 2003: Lean Software Development   * in 2006: Implementing Lean Software Development   * in 2009: Leading Lean Software Development Mary and Tom Poppendieck are highly regarded _lean_ experts, so I should have probably read one of their books, but I haven't read any of them. Which one should I start with?


title: Return compound structure from getter method in DTO

text: Suppose the following DTO class. Which of the two getters breaks encapsulation least?               class Foo         {         public:             /*Return the most primitive type. Caller do not need             to worry about what Array is*/             const RecType* dataBeginGet() const;             const RecType* dataEndGet() const;                  /*Return a reference to the Array.              Caller do not need to call two methods before iteration             */             const Array<RecType>& dataGet() const                 {return m_data;}              private:             Array<RecType> m_data;         };


title: Setting up an Ethical Guidance Committee for the protection of developers?

text: While doing some contracting lately for a fairly large company that handles its IT internally (mainly with younger technical staff who don't have the experience to deal with hierarchy), I came across what must be a common situation with regard to the board level not really understanding the ethical considerations of some of the things that they require from the technical department. As an example, board level members seeing software which "would be nice to incorporate into our platform" without due consideration to licensing ("well, why dont we just remove the licensing and ship it - who will know?" etc) and sales people promising highly problematic features and deadlines that the technical team now must keep because the client is a large one. The standard issues in large companies... As a "disposable" contractor, I raised this with the director that brought me on board, and he asked me what the best way was to resolve said issues without causing major battles between the various people involved... So, one thing led to another and to my surprise I found that my suggestion of an internal advisory body from the pool of general employees was taken up by the board - and I was given the task of implementing it. The board have committed to having one representative from this committee at every board meeting (with special dispensation for confidential discussions allowed) for the next year, as a trial measure - the representative is to take note on current discussions and report back to the committee, and make advisory notes to the board. Has anyone else done this? What advice can people give? Is there anything to watch out for? My idea has gained wide support with the general employees of the company, with many people wanting to put themselves forward for it, so acceptance doesn't seem to be an issue.


title: CPOL License. Can I use it on my commercial application without distributing source code?

text: I'm considering using a project from http://www.codeproject.com that uses the CPOL license. Section 5e says: "You may distribute the Executable Files and Source Code only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy of the Executable Files or Source Code You distribute and ensure that anyone receiving such Executable Files and Source Code agrees that the terms of this License apply to such Executable Files and/or Source Code. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute the Executable Files or Source Code with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License." Is not clear to me if I should include their source code with my executable or not. Or even worse, if I should make my own source code available such as with GPL license. The reason why is not clear to me is because I'm not sure if by compiling their source code together with mine I'm "distributing" either their "Source Code" or "Executable Files"?