Impact of Website Redesign on Google Analytics

I just finished a redesign for a website that is currently using Google Analytics. I want to continue to use Google Analytics, but I'm not sure if I should create a new profile for the new site or simply use the old UA number. The new website has a completely different URL structure and much of the content has been updated/deleted/added.


I have one afternoon to extol the benefits of .NET over VB6... what do I say?

My company is a small twenty-man engineering firm. All the application programming here is done in VB6 by two people, who have taught themselves VB6 from an assembly background while working here for the past 25+ years, and myself. As a result, the VB6 code is riddled with horrendous code smells, like tons of stringly typed variables, terribly long functions, hundreds of public global variables (some of which are preferred over passing around arguments and returning values,) and not a single object class. Refactoring is nigh impossible, and any changes require too much digging through code, and once made, always seem to introduce more holes. My boss is realizing that VB6 is a dead technology, and is willing to listen to my pleas of moving to .NET for new development. We are moving forward to .NET, but he sees it as a way to keep up compatability with the newer Windows OS's, not as a way to write better code. How can I best explain the benefits of .NET language over VB6, beyond mere up- to-date-ness? What can I say to best emphasize that the move to .NET is a good move _but also_ that it means our current programming paradigm should also begin to change? As soon as my boss hears that Visual Basic .NET looks just like VB6, I know that his first instinct will be to simply convert our old code mess to .NET. I understand that it will be impossible to change anyone's mindset in a single afternoon, but how can I at least convince my assembly-toting boss that things like strongly-typed variables, custom classes, and private fields aren't a _total_ waste of time and energy?


Why do trees grow downward?

Why do trees grow downward in computer science? I have a feeling it goes back to a printer, and that a program traversing a tree first prints the root, and uses the notion of a bottomless stack of paper to express the indefinite levels of recursion that might be encountered. References: > Trees grow downward, having their roots at the top of the page and their > leaves down below From ON HOLY WARS AND A PLEA FOR PEACE. > by convention, trees are drawn growing downwards From the Wikipedia article on tree data structures. > Real trees grow from their root upwards to the sky, but computer-science > trees grow from the root downwards From David Schmidt's lecture notes.


free as in free beer

Some years ago (more precisely in 1998) the confusion english-speaking people start making with the term **free** when applied to software led some members of the free software foundation to create a new term: **open source** ( http://www.gnu.org/philosophy/free-software-for-freedom.html ) The great concern was that people was misunderstanding free as in free of speech, with free as in free beer (see wikipedia: http://en.wikipedia.org/wiki/Free_and_open_source_software ). The free here relates to the the liberty of using and sharing your software, in a way that goes against proprietary "copyright" (and patented) software. It was first introduced by Richard Stallman, in 1986. The core is the set of freedoms:   * Freedom 0: The freedom to run the program for any purpose.   * Freedom 1: The freedom to study how the program works, and change it to make it do what you wish.   * Freedom 2: The freedom to redistribute copies so you can help your neighbor.   * Freedom 3: The freedom to improve the program, and release your improvements (and modified versions in general) to the public, so that the whole community benefits. Well, we all know about that (at least those who is following this discussion since ever). In my opinion, the term open-source clarified us. But it was already assured by Freedom 1. In other languages (like spanish or portugese, for instance), we can say free as libre or livre. And the other meaning of free, as in free beer, as gratis. So, for others, there was never a confusion (actually, only when reading english articles about it). Freedom number 2 guarantees my right to redistribute copies at will. I understand that as I don't need to pay the owner any royalties for every copy I give away to my friends or students. And of course, we will agree with that. This, ultimately means, that I **can** give free (gratis) copies, or also I can charge for copies (support, media, etc.). Now, If something can be given away for free (gratis), then it is free (gratis). No matter if someone, or some enterprise, wants to sell, you still have ways (sites, downloads, friends, etc.) to get it for free (gratis). So, in my non-english point of view, we have 3 different things here. The most important, undoubtedly, is the free (freedom, liberty, libre, livre, so you can all the stuff you want) quality of the software. The other, is being open- source (so you can see the code inside). The last one **IS** another **GREAT** quality, that is, there **EXIST** free (gratis, non-chargeable) software. Being free (gratis) does not mean it is forced free (gratis). You can have people who sells, who pays, and who gets/sends for free. Still, it is a quality. What I don't understand is why, after so many years, people from FSF are still cautious to say that there is free (gratis) software also. Yes, free as in free beer. If it is a quality why hide it? Just to prevent confusion? Well, let me tell you the news: confusion was already made since the beginning. I was alive and interested in the subject when it started, and I remember lots of discussions about this free being free of charge, or free of restrictions. After lots of consulting, lawyers helped to write the first "license" in terms that could be used in court, introduced the term "copyleft", and made it "clear" that free is not about price. At that time, because of the novelty, ok, I agree to emphasize this half-part of the free. But now we are over it. Isn't it time to tell people that we ALSO have free as in free of charge. Three qualities is better than two: livre/gratis/open. So, why don't we tell people that free software can be just free? Edited: More objectively: 1- Is a free (freedom) software necessarily free (gratis)? 2- Is a free (gratis) software necessarily free (freedom). The first one is the important question, as the second is just there to hold fast typers (we all know the answer). Another question raised from the discussion: Is free (gratis) a quality? (I assumed that as taken for granted in the question introduction)


Do you see an use for "Spreadsheet programming"?

A while ago I stumbled upon the concept of using spreadsheets (I mean cells and formulas not Macro code) as a way to specify programming logic. The idea is:   * create a spreadsheet with a cleanly defined flow of calculations (which sometimes are better suited to the "dataflow" paradigm of spreadsheets instead of procedural or object oriented programming styles)    * define input cells   * define output cells   * compile the whole thing into a stand-alone executable class (or function, procedure, ...)   * use it in normal code within a broader software project   * use the spreadsheet as source code to be maintained over time The idea is to use this technique for problems the really fit into the model and that this would lead to naturally well-documented and easy maintainable code. I am interested in knowing whether you have experienced using the technique and what for. An example application that came to my mind are insurance tariff calculators, that are typically drafted, created and validated by actuaries on Excel sheets and only later coded (it's a painful process) in some hard-to-maintain programming logic.


what should i use  running cron or getting by query

I have a table which has the amount,entrydate and amtperday field , which is to decrease daily. so what is better running the cron job daily to decrease amount. or or at the time of fetching data calculate the amount perday with the date field , i can get the no. of day > amount = amount- no.of day * amtperday so which is good Please suggest ?


Design Patterns - Why the need for interfaces?

OK. I am learning design patterns. Every time I see someone code an example of a design pattern they use interfaces. Here is an example: http://visualstudiomagazine.com/Articles/2013/06/18/the-facade-pattern-in- net.aspx?Page=1 Can someone explain to me why was the interfaces needed in this example to demonstrate the facade pattern? The program work if you pass in the classes to the facade instead of the interface. If I don't have interfaces does that mean


Simple website with a GPL V3 Framework

I write web-based software and simple website ("Home", "Who we are", "Contact"). For a simple website I'm using a covered GPL v3 framework. The user surf the website, send an email, take info, etc. I repeat: simple website, not a Joomla or Wordpress. 1) Will the website be covered with the GPL? I don't modify the framework. I'm using his classes in other classes... (OOP). 2) For the point 1, if yes, do I need to add (e.g. in the footer) name of framework and his link? 3) I must permit download of entire website to study code (nothing that a programmer has interest in)? E.g. placing it in Github? 4) If 2 is NO, how you can "understand" that we use that framework? In effect no php lines are exposed to the browser... You cannot understand that when you push "Send email" the site is calling `$this->send($email)`. If you write me an email "Are you using XXX framework"? I can answer NO.


browsing with curl instead of firefox (or any other browser)

My company has 2 Intranets (one technical, and one commercial), I am the administrator of the technical Intranet. We need to see if a client has a contract for a service we offer. As such, for ease of use (for us in the tech department) I made a button in our Intranet that reads data via `ajax->php->curl->dom` from the commercial intranet, gets the type of the contract, and if it's valid prints the contracts into a DIV tag. So we don't have to open a new tab, look up the client, go through all the commercial info in there just to see something as simple as "yes is ok" or "no disable the service"). Now the admin from the commercial Intranet (the nephew of somebody on the Board) went to the Board complaining that we steal information from them according to this internal decision:               Any addition of new functions, any changes to the current functions or       operating procedures of any service related to commercial databases       provided by the company will be made only with approval from the Board.      But we did not add new functions, we did not modify existing functions or procedures, we just read the data with curl instead of a normal browser. I am into optimizations, efficiency, and user-friendly experience so in our Intranet with 2 or 3 clicks (and max 3 seconds) you get the info you need, otherwise I think I did something wrong and I try to improve. The script we are talking about returns the data to the user in around 1 - 3 seconds, but now the Board forbids us to use it anymore, and our team is slower (you need about 2-5 minutes, and around 8-12 clicks to find a client with the commercial intranet (it's a real mess). In your opinion is there a legal difference betwen using curl of firefox (or any other browser), to read a simple HTML page (no javascript invloved), acording to the decision above or in general ? P.S. I know you are not lawers, just give a programmer point of view. Thank you


How often should I/do you make commits?

I am a recent (as of yesterday) college grad - BS in Computer Science. I've been a huge fan of version control ever since I got mad at an assignment I was working on and just started from scratch, wiping out a few hours worth of actually good work. Whoops! Since then, I've used Bazaar and Git (and SVN when I had to for a Software Engineering class), though mostly Git to do version control on all of my projects. Usually I'm pretty faithful about how often I commit, but on occasion I'll go for a while (several functions, etc.) before writing a new commit. So my question for you is, how often should you make commits? I'm sure there's no hard and fast rule, but what guideline do you (try to) follow?


Can commits be considered too small?

> **Possible Duplicates:**   >  git / other VCS - how often to commit?   >  How often should I/do you make commits? The usage of source control is very different from one developer to another and from project to another. Some commit very often; others can spend a whole day or several days without committing (especially when they work on the project alone or they know that other team members are working on very different part of the project). ## Examples Sometimes, I've seen extremely small commits, both in real life and in webcasts and other learning material. Some examples, mostly from real life, are:   * A commit which solves a bug #... or implements a feature #... by changing one line of code. IMHO, it's a perfectly valid case for a commit, especially if the bug tracking system is linked to the version control and is updated automatically according to the revisions. Even without this link, it's useful to track which commit solved what, independently of the number of changes required to solve a bug or implement a feature.   * A commit which changes a single configuration setting (given that in the context, configuration settings must be in source control). IMHO, this could be merged sometimes with another commit, unless the previous setting breaks the build or introduces a bug or can affect other developers (for example a connection string which changed after the test database server was migrated).   * A commit which corrects spelling of a word, for example in a string displayed to the user. IMHO, in most cases, this can be merged with another commit (unless, again, it breaks the build). The only case where it cannot be merged is when, if left, the wrong spelling can be propagated through code and would be too complicated or impossible to change later, as with HTTP _referer_ header.   * A commit which adds a comment to a method (while the method was already explicit enough) or solves another minor style-related rule. Example: in .NET Framework, StyleCop requires to document every method, and the XMLDoc comment for a constructor (which is method too) must begin with: > Initializes a new instance of the <Class name here> class. A commit can enforce this last rule, replacing a comment in legacy code: > Creates a new vehicle with the specified number of wheels. by: > Initializes a new instance of the Vehicle class, using the specified number > of wheels. In other words, the revision has no meaning other than to conform the piece of code to the style standards used in the codebase. IMHO, this can be merged with another commit in every case (after all, style- related rules must be enforced at commits to reject the commits of the code which doesn't match them), unless there are several changes in several places. ## Questions Am I wrong on those points? Is there such a thing as a commit too small, or is a practice of committing very often a best practice? Does it worth it to commit too small changes, given that it would "pollute" the revision log and make it more difficult to find the relevant changes among tiny changes nobody cares about and which don't break or unbreak the build, nor affect other developers?


Using Git - better to do lot of incremental updates or one big daily update?

Ive just started working with Git (Github) in anticipation for an up coming project I'm project managing and designing and developing the front end of. One thing I couldn't work out is, is it preferable to publish each individual change as you make them, ie. updated sidebar js, designed new FAQ page (each as individual commits) and the back end developers would be doing the same ie. added this class, refactored this.. Or is it better to do a daily / half daily commit of all the work you've done? My thoughts were that if you do lots of small commits its easier to roll back, but also at the same time every commit you make the rest of the team has to get locally before they can commit their code. You obviously don't have this problem so much if you do daily or half daily commits, but its a little more complicated to roll back if you need to? Is there a best practice for this or is it down to team preference? Background: I'm using Github via the mac desktop app not the CL.


Git for a solo developer

I'm a developer working on a Wordpress project. I work on this alone and I want to improve the way I use Git but I don't know where to start. Currently, I'm using git to commit all of the work that I've done for the day as long as that specific work is done. Here are some instances where I commit a specific work:   * A specific feature whose code can be written within a day   * A bugfix For bigger features that can take weeks to finish I create a branch for it, then commit the sub-features once they're done. But often times I feel like I'm committing way too much; for example, when I'm trying to solve lots of bugs I do not commit each and every bug that I resolve. Sometimes I also end up working with 2 or more things that should be in there own commits. Then I'll find it hard to just target the specific files within a specific change so I end up putting them all in one commit and end up with a commit message like `add search feature and add caching feature`. What I want to know are the best practices for solo developers working with Git. For solo developers out there you're welcome to answer with your own workflow as well.


When to commit code?

When working on a project, the code may be developed reasonably fast in a single day or bit by bit for a prolonged period of few weeks/months/years. As code commits are becoming to be considered as a measure of project development, it doesn't really mean it has more code written than a project that has lesser commits. So the question is when to really make a commit to the repository so that the commit is justifiable? As a add-on: Is it a correct practice to measure a project's development based on its commits?


When is a version control commit too large?

I've heard in several places "Don't make large commits" but I've never actually understood whats a "large" commit. Is it large if you work on a bunch of files even if there related? How many parts of a project should you be working on at once? To me, I have trouble trying to make "small commits" since I forget or create something that creates something else that creates something else. You then end up with stuff like this:               Made custom outgoing queue          Bot     -New field msgQueue which is nothing more than a SingleThreadExecutor     -sendMsg blocks until message is sent, and adds wait between when messages get     sent     -adminExist calls updated (see controller)     -Removed calles to sendMessage          Controller     -New field msgWait denotes time to wait between messages     -Starting of service plugins moved to reloadPlugins     -adminExists moved from Server because of Global admins. Checks at the channel,     server, and global level          Admin     -New methods getServer and getChannel that get the appropiate object Admin     belongs to          BotEvent     -toString() also show's extra and extra1          Channel     -channel field renamed to name     -Fixed typo in channel(int)          Server     -Moved adminExists to Controller          PluginExecutor     -Minor testing added, will be removed later          JS Plugins     -Updated to framework changes     -Replaced InstanceTracker.getController() with Controller.instance     -VLC talk now in own file          Various NB project updates and changes          ---          Affected files     Modify  /trunk/Quackbot-Core/dist/Quackbot-Core.jar     Modify  /trunk/Quackbot-Core/dist/README.TXT     Modify  /trunk/Quackbot-Core/nbproject/private/private.properties     Modify  /trunk/Quackbot-Core/nbproject/private/private.xml     Modify  /trunk/Quackbot-Core/src/Quackbot/Bot.java     Modify  /trunk/Quackbot-Core/src/Quackbot/Controller.java     Modify  /trunk/Quackbot-Core/src/Quackbot/PluginExecutor.java     Modify  /trunk/Quackbot-Core/src/Quackbot/info/Admin.java     Modify  /trunk/Quackbot-Core/src/Quackbot/info/BotEvent.java     Modify  /trunk/Quackbot-Core/src/Quackbot/info/Channel.java     Modify  /trunk/Quackbot-Core/src/Quackbot/info/Server.java     Modify  /trunk/Quackbot-GUI/dist/Quackbot-GUI.jar     Modify  /trunk/Quackbot-GUI/dist/README.TXT     Modify  /trunk/Quackbot-GUI/dist/lib/Quackbot-Core.jar     Modify  /trunk/Quackbot-GUI/nbproject/private/private.properties     Modify  /trunk/Quackbot-GUI/nbproject/private/private.xml     Modify  /trunk/Quackbot-GUI/src/Quackbot/GUI.java     Modify  /trunk/Quackbot-GUI/src/Quackbot/log/ControlAppender.java     Delete  /trunk/Quackbot-GUI/src/Quackbot/log/WriteOutput.java     Modify  /trunk/Quackbot-Impl/dist/Quackbot-Impl.jar     Modify  /trunk/Quackbot-Impl/dist/README.TXT     Modify  /trunk/Quackbot-Impl/dist/lib/Quackbot-Core.jar     Modify  /trunk/Quackbot-Impl/dist/lib/Quackbot-GUI.jar     Modify  /trunk/Quackbot-Impl/dist/lib/Quackbot-Plugins.jar     Modify  /trunk/Quackbot-Impl/lib/javarebel.stats     Add /trunk/Quackbot-Impl/lib/jrebel.info     Modify  /trunk/Quackbot-Impl/nbproject/private/private.properties     Modify  /trunk/Quackbot-Impl/nbproject/private/private.xml     Modify  /trunk/Quackbot-Impl/nbproject/project.properties     Modify  /trunk/Quackbot-Impl/plugins/CMDs/Admin/reload.js     Add /trunk/Quackbot-Impl/plugins/CMDs/Operator/hostBan     Modify  /trunk/Quackbot-Impl/plugins/CMDs/Operator/mute.js     Modify  /trunk/Quackbot-Impl/plugins/CMDs/lyokofreak/curPlaying.js     Modify  /trunk/Quackbot-Impl/plugins/CMDs/lyokofreak/lfautomode.js     Modify  /trunk/Quackbot-Impl/plugins/listeners/onJoin.js     Modify  /trunk/Quackbot-Impl/plugins/listeners/onQuit.js     Modify  /trunk/Quackbot-Impl/plugins/testCase.js     Add /trunk/Quackbot-Impl/plugins/utils/whatsPlaying.js     Modify  /trunk/Quackbot-Impl/src/Quackbot/impl/SandBox.java     Add /trunk/Quackbot-Impl/vlc_http     Add /trunk/Quackbot-Impl/vlc_http/current.html     Modify  /trunk/Quackbot-Plugins/dist/Quackbot-Plugins.jar     Modify  /trunk/Quackbot-Plugins/dist/README.TXT     Modify  /trunk/Quackbot-Plugins/dist/lib/Quackbot-Core.jar     Modify  /trunk/Quackbot-Plugins/nbproject/private/private.properties     Modify  /trunk/Quackbot-Plugins/nbproject/private/private.xml     Modify  /trunk/Quackbot-Plugins/src/Quackbot/plugins/JSPlugin.java     Add /trunk/Quackbot-Plugins/vlc_http     Add /trunk/global-lib/jrebel.jar      Yea.... So for questions:   * What are some factors for when a commit becomes too large ( _non-obvious stuff_ )?    * How can you prevent such commits? Please give specifics   * What about when your in semi-early stages of development when things are moving quickly? Are huge commits still okay?


How big should a single commit be?

A discussion has come up at work and I want to get the opinion of other programmers. During my time in college, we only used SVN for sourcecontrol. Everybody commits to the same server and all changes are pulled to all machines. In this system, it's easy when you should push your changes: when you're done with your changes. However, this makes merging changesets by multiple developers a complete nightmare. However, for the past year or so that I've been programming professionally, we've been using Mercurial for source control. At first, I was using it like SVN: work on a featur, commit and push in one go, but only when it's finished. Gradually, my habits started to change. I learned about branches, how commits could be a draft, public or secret and even used a USB stick as a central repository. My commits became smaller, but they increased in quantity. Instead of committing and pushing in one go, I would make commits for every change in a named branch. Here's what the repository for one my personal projects looks like: ![Repository layout](http://i.stack.imgur.com/t0h7X.png) I see a couple of advantages in this approach.   * Small commits mean they are focused on a single subject. Every commit gets a one-line description of the changes, which makes them easy to follow even after weeks of inactivity.   * Named branches keep you on topic. If you're working in the "refactor-text-rendering" branch, for example, you shouldn't make changes to the math library, because that's not related to the branch's topic. However, the lead developer is annoyed by my methodology. He feels that the small commits clutter up the repository's history. His preferred methodology is to work in a patch. When the feature is done, he merges the commits and pushes them in one go. So, what do you prefer? A flow of consciousness history of commits or a patch of changes every now and then? Or something else entirely?


What to do if my own opensource code greatly resembles another project's code?

I'm writing a Java class, part of an opensource game development framework under the Apache 2.0 license. There is another framework, under the same license, that happens to also have a Java class that addresses the same subject as mine. I recently checked it out, and my implementation is extremely similar to that. Heck, even the local variables. The differences are minimal. Since both classes are opensource, I guess it doesn't matter. However, since the codes are so similar, anyone may come to the conclusion that I just modified theirs a bit, and eventually quote the license: >   * You must give any other recipients of the Work or Derivative Works a > copy of this License; > >   * You must cause any modified files to carry prominent notices stating > that You changed the files; > > Since I wrote my class, there's no need to put their copyright notice in my code. However, it cannot be proven that I didn't just copy their code and modified a bit. What is one supposed to do in this scenario?


Reasons for either 32-bit or 64-bit as development machine

I'm about to make a new Linux install, which will be primarily used for programming. I've seen benchmarks showing speed improvement of 64-bit version, however, I have hard time of telling how much these benchmarks translate to improvement in every day usage. And of course there are other aspects to consider. Usage I have in mind:   * mainly programming Python, with occasional C, C++ and Java;   * IDEs, which are using Java platforms (Eclipse and IntelliJ);   * on very rare occasions having to compile for 32-bit platform;   * not planning to have more than 64GB of RAM anytime soon (and I don't mind using PAE kernels);    * machine in question has 4GB RAM and Athlon II X2; What are pros and cons of choosing either i386 or x86_64 distro?


Freelancing dilemma.. to do or not to do?

My current organization has stated clearly that I should not work on any freelancing projects in the fields where the company offers their service. I agreed to that and joined the organization. At the time of joining, I also mentioned that I am a member of an NGO for last two years, not as a programmer but giving my social services there. They agreed to that and everything is working smoothly. But recently my NGO has decided to build their site. I was called to be a part of programming team but I refused because of that condition. The NGO agreed and excluded me from the programming team. But they insisted on me being a translator and requested that I arrange for translators from other languages. I had managed to bring a team of translators. Now my NGO is planning to make me head of translation team because they felt being a programmer and translator both I can be a bridge between two teams. Here is dilemma begins, my company is in website development business but they don't offer translation service. For the NGO website I am going to be credited for translation. Here my company is very strict on freelancing rules. But I am bit optimistic that they will allow me to be part of the NGO project which in sense not going to compete with any of their products. They are strict in freelancing and I am sure that they are not going to allow me. If anything goes wrong, on the other side, I don't see any legal problems in doing this and am excited to be a part of the website. What would you do if you faced this situation?


Sortable listview using SQLite

I'm implementing a sortable listview using bauerca's library here. This works, but now I need to define some things where I need some help. This is the functionality of my app_ I can create up to 5 names. These names are saved in a SQLite database. Then, in other activity, these names are loaded from the database and shown to select which ones I'm going to use. With 5 names, there are several combinations I can use, but the basic porpouse of this app is that when I select some names, these are shown in a sortable listview where I can sort them. After sorting them, they should be saved in another database to remember the position of each one. For this, the second database has these columns: NAME, GROUP, ORDER. **My approach is this:** if I select for example `NAME1` and `NAME2`, this would be `GROUP2_1`. If I select `NAME1` and `NAME3` this would be `GROUP2_2`... and this with all the posible combinations. Then, in the `ORDER` column, the position of each name in the listview is saved. But seems that this approach with the GROUP column doesn't work... it saves the position of each name, but regardless of the group to which it belongs. So for example, if I have these names:               MARK     PAUL     JERRY      If I select MARK and JERRY, the listview at first time would show them that way:               MARK     JERRY      But now I sort them:               JERRY     MARK      So these combination belongs to GROUP2_1 and JERRY has 1 value in the ORDER column and MARK the 2. If now I go back and I select this other combination:               MARK     PAUL     JERRY      This should be GROUP3_1, and now I sort them this way:               MARK     JERRY     PAUL      So now MARK has ORDER value 1, JERRY 2 and PAUL 3. Now if I go back and load again the first combination, it will load the names with the last asigned ORDER value so instead of loading in this order:               JERRY     MARK      It will load them using the values of the last combinations:               MARK     JERRY      Sorry for such a long explanation, but I dind't know other best way to explain my issue. In resume, the problem is that the ORDER value is asigned to each name, regardless of the GROUP, so this is not a valid approach for what I need to get. **Update -- key definition** Thats my current table:               db.execSQL("CREATE TABLE " + TABLE_NAME + " (" +                 TravelOrder._ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +                 TravelOrder.NAME + " TEXT NOT NULL " +                 ");");


REST or a message queue in a multi-tier heterogeneous system?

I'm designing a REST API for a three-tier system like: `Client application` -> `Front-end API cloud server` -> `user's home API server (Home)`. `Home` is a home device, and is supposed to maintain connection to `Front-end` via Websocket or a long poll _(this is the first place where we're violating REST. It gets even worse later on)_. `Front-end` mostly tunnels `Client` requests to `Home` connection and handles some of the calls itself. Sometimes `Home` sends notifications to `Client`. `Front-end` and `Home` have basically the same API; `Client` might be connecting to `Home` directly, over LAN. In this case, `Home` needs to register some `Client` actions on a `Front-end` itself. Pros for REST in this system are:   * REST is human-readable;   * REST has a well-defined mapping of verbs (like CRUD), nouns and response codes to protocol objects;   * It works over HTTP and passes all the possible proxies; REST contras are:   * We need not only a request-response communication style, but also a publish-subscribe;   * HTTP error codes might be insufficient to handle three-tier communication errors; `Front-end` might return `202 Accepted` to some async call only to find out that necessary `Home` connection is broken and there should have been `503`;   * `Home` needs to send messages to `Client`. `Client` will have to poll `Front-end` or to maintain a connection. We are considering WAMP/Autobahn over Websocket to get publish/subscribe functionality, when it struck me that it's already looking like a message queue. Is it worth evaluating a sort of messaging queue as a transport? Looks like message queue contras are:   * I'll need to define CRUD verbs and error codes myself on a message level.   * I read something about "higher maintenance cost", but what does it mean? how serious are these considerations?


Why use subtyped functions?

Say you have arguments A1 >: A2 (contra-variant), and return types B1 <: B2 (covariant). The corresponding functions are such that: A1 => B1 <: A2 => B2 Sometimes, this makes sense to me - I will grasp it in a flash of lateral thinking. And then a few days later it is lost to me until I struggle through it for another hour or so. Using an example from Odersky's Scala MOOC (this is not an assignment spoiler), Empty and NonEmpty are both subtypes of IntSet. I understand that you cannot pass an IntSet into a function expecting a NonEmpty, since the IntSet might be an Empty. Therefore the latter (A2 => B2) cannot be a subtype of the former (A1 => B1). And I understand that you _can_ pass a NonEmpty into a function expecting an IntSet, apparently because the function will only be calling IntSet-specific methods that all subtypes have implemented. Therefore the former _can_ be a subtype of the latter. Similarly, a function that returns an IntSet cannot be a subtype of a function that returns a NonEmpty, because that returned IntSet cannot necessarily do everything the NonEmpty can do. Conversely, a function that returns a NonEmpty _can_ be a subtype of a function that returns an IntSet, since that returned NonEmpty will conform to the IntSet contract. But what I'm having trouble grasping is, if you _can_ pass a NonEmpty into a function expecting an IntSet, and if that function were a subtype of a function expecting a NonEmpty (ostensibly because it is calling NonEmpty- specific methods in its implementation), then why would you ever want to use that subtyped function? Does anyone have examples of this being useful? Why use subtyped functions? To me it just seems dangerous to pass in an IntSet if you know that it is going to call NonEmpty-specific functionality.


Rails/Node.js interaction

I and my co-worker are developing a web application with rails and node.js and we can't reach a consensus regarding a particular architectural decision. Our setup is basically a rails server working with node.js and redis, when a client makes a http request to our rails API in some cases our rails application posts the response to a redis database and then node.js transmits the response via websocket. Our disagreement occurs in the following point: my co-worker thinks that using node.js to send data to clients is somewhat business logic and should be inside the model, so in the first code he wrote he used commands of broadcast in callbacks and other places of the model, he's convinced that the models are the best place for the interaction between rails and node. I on the other hand think that using node.js belongs to the runtime realm, my take is that the broadcast commands and other node.js interactions should be in the controller and should only be used in a model if passed through a well defined interface, just like the situation when a model needs to access the current user of a session. At this point we're tired of arguing over this same thing and our discussion consists in us repeating to ourselves our same opinions over and over. Could anyone, preferably with experience in the same setup, give us an unambiguous response saying which solution is more adequate and why it is?


Distribute No Modify License

I would like to release some code and some documentation to be distributed freely, but not if it has been modified in any way. Basically, needs to be shared "as-is". The reason is I would like to retain control of all modifications without making it it closed source. Is there a commonly available license that allows for this? Thanks


What percentage of code and runtime do you typically allow for testing?

When I write code, a certain amount of it is just for the purpose of logging, tracing, or otherwise "testing" what the program is doing. This not unit testing; this is not when it is running in "debug" mode or something similar; it is not things like assert statements that get stripped out by some compiling step. But actual production code and runtime execution for the purpose of knowing what the system is doing and writing it out somewhere. Naturally, there have to be various settings in various places (config files, admin interfaces, etc), that allow for more or less of such things. But even if all settings are at their lowest level, I still like to have my system keep track of its own state and report it in some minimalist manner that I or operations people can use to troubleshoot even without turning on/up the other settings. So here is my question: how much of your code or system run-time do you typically devote to such permanent-troubleshooting purposes? I say both code and run-time as they are two measures: how many lines of code relative to all lines of code, because the more the code the more the maintenance; and how much run-time performance because these things do consume CPU time, however small. And there is not always a direct connection between lines of code and run-time consumption. Personally, I'm happy to devote up to 10% of my code to such things and up to 5% of the run-time. Have you ever read any industry authorities that have an opinion on this? Who? What is your opinion?


Concurrent Data Processing by Multiple People

Let's say I have a page, accessible by several people concurrently, that lists information that must be processed in some way by the user, after which it is either marked as "completed" and effectively disappears, or is left unprocessed and thus left in the list to be tried again later. What is the best way to ensure that only one person is handling a given item in the list at a time, assuming that I must show the list (i.e. no one user/one item requirement, which is what I would prefer), and that any given user can click on any item in the list at any time? This is an issue that has come up several times where I work, and I'm not really satisfied with the solution that I've implemented up until now. I was hoping someone had a better idea. Basically my solution involved creating a table in a database to track who accessed what item and when, and then enabling/disabling features based on that (e.g. not allowing a user to edit info if it's checked out by someone else). It looks something like the following (using Oracle 11g...these are stripped way down for brevity here, with INFO columns acting as a stand in for all other columns that are irrelevant here).               CREATE TABLE "SOME_INFO"     (       "INFO_ID"       NUMBER(19,0)      NOT NULL ENABLE,       "INFO"          VARCHAR2(20 BYTE) NOT NULL ENABLE,       "IS_PROCESSED"  CHAR(1)           NOT NULL ENABLE,       CHECK ("IS_PROCESSED" IN ('Y', 'N')) ENABLE,       CONSTRAINT "PK_SOME_INFO" PRIMARY KEY ("INFO_ID") USING INDEX     ); /          CREATE TABLE "SOME_PERSON"     (       "PERSON_ID" NUMBER(19,0)      NOT NULL ENABLE,       "INFO"      VARCHAR2(20 BYTE) NOT NULL ENABLE,       CONSTRAINT "PK_SOME_PERSON" PRIMARY KEY ("PERSON_ID") USING INDEX     ); /          CREATE TABLE "PROCESS_HISTORY"     (       "INFO_ID"       NUMBER(19,0)  NOT NULL ENABLE,       "PROCESSOR_ID"  NUMBER(19,0)  NOT NULL ENABLE,       "CHECKED_OUT"   DATE          NOT NULL ENABLE,       "CHECKED_IN"    DATE     ); / "Checking out" a record from SOME_INFO for a given user is accomplished by INSERTing a new record into PROCESS_HISTORY with INFO_ID = the selected record's INFO_ID, PROCESSOR_ID = the users PERSON_ID, and CHECKED_OUT = the current time (CHECKED_IN is left NULL). "Checking In" is accomplished by simply setting CHECKED_IN to the current time. An automated process is used to periodically check in records that have been checked out for more than some predefined maximum amount of time (the time varies from page to page based on what's involved in processing the info). From this I can tell if a given record is currently checked out or not, and thus alter the page's behavior accordingly. Having said that, I can't help but think there's got to be a better way to do this. I'm hoping it's a common enough problem that there is a standard or semi-standard method of doing this that I simply haven't been able to find.


Is there an IDE for python that creates the same kind of reflective environment that Smalltalk provides?

As anyone who has used Smalltalk knows, one of the main benefits (other than a late-bound language that discourages many poor practices), is that the system is totally transparent and reflective, which makes understanding APIs and existing code easy, and locating functionality pretty easy. Is there anything that creates a similar environment for Python? A few examples of features of a smalltalk development environment, not natively found in python are:   * search class/method/etc names,    * examine inheritance hierarchies   * functionality to show the full interface of a given class/object, and where the properties therein originate   * an integrated graphical debugger which allows one to examine the full state of everything in the system, and see every instance of a given type, as well as all threads.  Note that I use windows, so anything that works well on windows would be particularly useful.


Leading Web Application Publications

Almost every major industry has it's standard publications which are considered "must reads" in that particular field. After spending some time on Google looking for web application publications, I've come up empty; are there any high quality web application publications available online or through print that someone can point me to?


There is always a debate over the topic - "Whether to put the business logic in Stored Procedure or Not?". If we decide not to use the ORM Tool and not to put the Business Logic in Stored Procedure then where would we put the Business Logic? In my previous applications I have always preferred putting all of the Business Logic in Stored Procedures only. Then from .NET code I call these Stored Procedures using Data Access Application Blocks. SQLHelper etc. But this can not be the scenario all the time. So I did some googling but ended up in confusion....... Any suggestionss...?


Where can I obtain a first-generation copy of the classic “Sorting out Sorting”?

I cannot even figure out who made it - even the IMDB page is mostly blank, and Wikipedia does not seem to have any information about it. For such a useful film in CompSci, it strikes me as odd that the only meaningful Internet presence I can find are horrible quality copies or excerpts on YouTube. [Note: SO claims this question was migrated to here, but the URL they provide gives a 404, and I can't find it by searching Programmers.SE, so I'm re- asking...]


Writing Resumes for Internships?

I'm an undergraduate student starting to look for internships. I understand a lot about how to embellish a real-world resume--emphasizing tasks done at previous jobs and whatnot--but I'm not sure if it will translate well to low- experience internship resumes. Internship Resumes are marked by:   * Few to no past Software-related full-time jobs or internships   * Few to no non-school-involved Software-related activities Obviously if you have no experience or activities to list, you're pretty well stuck. So let's assume we have one of each. I'm basically wondering:   1. What is a company looking for most from Intern candidates? Past work, GPA/coursework, Outside projects (Open Source, etc), certain skill sets (languages)   2. Should I be emphasizing _tasks_ , or _jobs/positions_ when listing my experiences?   3. Are skills important to list? If so, which ones in particular?


Would you use (a dialect of) LISP for a real-world application? Where and why?

LISP (and dialects such as Scheme, Common LISP and Clojure) haven't gained much industry support even though they are quite decent programming languages. (At the moment though it seems like they are gaining some traction). Now, this is not directly related to the question, which is would you use a LISP dialect for a production program? What kind of program and why? Usages of the kind of being integrated into some other code (e.g. C) are included as well, but note that it is what you mean in your answer. Broad concepts are preferred but specific applications are okey as well.


Participate in open source project

Currently, I am through a very creative phase as a developer. I think it's a good time to contribute to an open source project. Not as "permanent" developer to a project but in a "help wanted" manner in many projects. The open source hosting services that I know are SourceForge and CodePlex. Any suggestions that will help me on this direction?


Work Item Traceability in TFS 2010

I have created a Windows Form project (VS solution) under a TFS 2010 project. I may eventually add more solutions to the TFS project. **My question** : Can we create a Use Case WIT for a specific solution within a TFS project? Furthermore, is it possible to create a "traceability matrix" that starts at the Use Case level and goes down to the the code level (at least the namespace level) of that particular VS solution?


Fundamental TDD: stuck with writing a test so I can write code that I want

I have a Season class. This Season has a few properties: among them, a list of Games. This should be populated from the same source that populated the rest of the Season properties. I have a test to ensure all items in that list are of type Game. There is no hard requirement that a Season must contain any Games, so testing that the list is not empty would not be entirely correct -- however, the test Season I'm using has plenty of games in it. Writing "the minimum amount of code to make a test pass" is already done, because it is the empty list (so there are no not-Game objects). What would be the _fundamental_ TDD way to get the production code to parse+add games to the Season object? Would the _pragmatic_ way be to test via the size? * * * An alternative would be to generate the list of Games in my test, and see if Season.games == list_of_games The problem with that is that there are a crapload of Foreign relations that will be going into those games, making the test code equivilant to the method that I'm testing -- which I don't think is the way it should work. Or should I build them "by hand" from the test data -- instead of parsing it?


In C# what is lifetime or lifespan of constant variable?

In C# if i declare a constant variable is any memory allocated to it as it acts as a compile time replacement? How long is the variable's life?


Why are packed structures not part of the C language?

Every C compiler offers the option to "pack" C structures (e.g. `__attribute__ ((__packed__))`, or `#pragma pack()`). Now, we all know that packing is required, if we'd like to send or store data in a reliable way. This must also have been a requirement since the first days of the C language. So I wonder why packed structures are not part of the C language specification? They're not even in C99 or C11 even though the necessity of having them is known for decades now? What I am missing? Why is it compiler specific?


Bottom-up or top-down approach?

Not sure if the title _really_ fits with the question, but figured it was the closest to give an overview of my question.. I'm working on a web application that (fairly heavily) employs the use of browser-specific CSS functions such as -moz-transform) and I'm curious as to what approach those with more experience developing these types of applications use. For context, I'm referringly _solely_ to front end development (my backend pipeline's pretty solid :)). The way I see it, there are two methods of development:   * Get new functionality working in all browsers, only introducing new code once all applicable browsers have all been tested.   * Get your functionality complete in one browser. Once your application is complete, start testing on other browsers and introduce fixes where needed. Generally, I've been following the latter. I feel as though it allows me to concentrate on the core functionality and get more completed faster than if I was essentially halting functional development every time something new was completed to deal with browser nuances. So, what practices do _you_ follow when it comes to client-side development? I don't work professionally as a web developer, so best practices in web development are a little tougher to come by, other than my own trial and error (and scouring w3c recommendations). However, always a good thing to learn from those smarter than you :).


How much credit do you take when you used plugins etc.?

I often develop an application entirely myself. But did I really? I feel strange about that claim and never know when that is true. I mean I designed it, coded it, but I used XYZ plug-in. Can I still claim that I did it all myself even though I didn't create the plugin I used? Consider this conversation? > **ME:** I designed and developed this app entirely myself. > > **Other:** Cool, how did you program XYZ part? > > **ME:** I didn't program that part I used XYZ plugin. > > **Other:** So you didn't really program it _ALL_ yourself than did you? I mean if I must give them credit for the plug-in I used, then do I have to give the language authors credit for the language I used and the IDE authors credit as well? Where do I draw the line? This is just something that always crosses my mine as soon as I am about to take full credit for a project, and was wondering others opinions on the matter.


Forking a GPL dual licensed software with business owned copyrights

After receiving some threats of the copyrights holder of a dual licensed software(GPL2 and commercial) to buy the commercial version for projects in production, I am thinking to make a fork. In a case of GPL2 and commercially dual licensed with business owned copyrights software, is forking the GPL2 version an option? Also, is forking a good way to deal with such cases? ## Background information The software is a web CMS released under 2 versions a GPL2 free open source edition and a commercial edition including technical support and extra functionality. The problem is that now, basing their argumentation on the "distribution" definition of the GPL2, the company holding the copyrights argue that delivering the software and some extensions to a client is considered as a "distribution". And that such a "distribution" falls under the GPL2 obligation to release the custom made extension code. Custom made extensions are mainly designs, templates and very specific functionality. Basically they give me 3 choices:   1. Buying the commercial licensed edition for projects based on the GPL in production,   2. Deleting all the projects in production based on GPL2 version,   3. Releasing all the extensions as GPL2 code. The first 2 options are nothing realistic for finished projects. The third option could be fine, but as most of the extensions are very specific, cleaning the code to make it usable by other users means lot of works and also I am not sure the clients will appreciate to have their website designs and specific functionality released publicly. The copyrights holding company even contacted some clients directly, giving them the "choice". I know that this is a very corporate interpretation of GPL2, and a such action is nothing close to legal, but as an independent developer, I don't want to take the risk to get involved in some long and tiring legal procedures. * * * PS. This question was first asked on Stack Overflow where it felt out of the scope and closed, after reading the present site FAQ, discussing about software licensing seems fine.


Is it good or bad form to name a function after the workaround it fixes?

Lets say you have to write some code to fix a bug that on first glance by another engineer would seem weird or unnecessary. Would it be good or bad form to put the code in a method named for example "preventWindowFromJumpingWhenKeyboardAppears" or just name it "forceSpecifiedWindowPosition" and then add a comment about why you are doing this when calling the method?


Making an attractive, yet still technical architecture diagram

Does anyone have any advice for making an "attractive" software architecture diagram? My manager told me to make my current architecture diagram (which was built just using Visio and basic icons) more "attractive" for a presentation I have to give to executive level types who are non-technical. I'm guessing he meant to have something that you'd show to customers or for marketing people to use. Any specific icon sets or particular tips people have? I cannot post my current diagram for privacy reasons but to get the general idea, it's just text, lines, and server icons (http://www.227volts.com/wp- content/uploads/2009/03/exchange2007visiostencils.jpg) that is the icon set that I am using. I'm honestly confused on how to make something like that "more attractive" (hell, I think black and white are always the best color combinations to use :P) Edit: So is something like this http://rollerweblogger.org/roller/resource/linkedin- today.png still considered "professional" with all the colors and such? I asked my manager and all he said was just make it more marketable while evading questions about what I should do specifically.


Application qos involving priority and bandwidth

Our manager wants us to do applicaiton qos which is quite different from the well-known system qos. We have many services of three types, they have priorites, the manager wants to suspend low priority services requests when there are not enough bandwidth for high priority services. But if the high priority services requests decrease, the bandwidth for low priority services should increase and low priority service requests are allowed again. There should be an algorithm involving priority and bandwidth. I don't know how to design the algorithm, can anyone assist in getting this right? All these services are within a same process. We are setting the maximum bandwidth for the three types of services via ports of services via TC (TC is the linux qos tool whose name means traffic control).


Architecturally speaking, does a database abstraction layer, such as Microsoft's Entity Framework, void the need for a separate Data Access Layer?

# The way it was For years, I have organized my software solutions as such:   * Data Access Layer (DAL) to abstract the business of accessing data   * Business Logic Layer (BLL) to apply business rules to data sets, handle authentication, etc.   * Utilities (Util) which is just a library of common utility methods I have built over time.   * Presentation Layer which could of course be web, desktop, mobile, whatever. # The way it is now For the past four years or so I have been using Microsoft's Entity Framework (I am predominately a .NET dev) and I am finding that having the DAL is becoming more cumbersome than clean on account of the fact that the Entity Framework has already done the job that my DAL used to do: it abstracts the business of running CRUDs against a database. So, I typically end up with a DAL that has a collection of methods like this one:               public static IQueryable<SomeObject> GetObjects(){         var db = new myDatabaseContext();         return db.SomeObjectTable;     }      Then, in the BLL, this method is used as such:               public static List<SomeObject> GetMyObjects(int myId){         return DAL.GetObjects.Where(ob => op.accountId == myId).ToList();     }      This is a simple example of course as the BLL would typically have several more lines of logic applied, but it just seems a bit excessive to maintain a DAL for such a limited scope. Wouldn't it be better to just abandon the DAL and simply write my BLL methods as such:               public static List<SomeObject> GetMyObjects(int myId){         var db = new myDatabaseContext();         return db.SomeObjectTable.Where(ob => op.accountId == myId).ToList();     }      I am considering dropping the DAL from future projects for the reasons stated above but, before doing so, I wanted to poll the community here for your hindsight/foresight/opinions before I get down the road on a project and discover a problem I didn't anticipate. Any thoughts are appreciated. # Update The consensus seems to be that a separate DAL isn't necessary but (making my own inference here) is a good idea to avoid vendor lock in. For example, if I have a DAL that is abstracting EF calls as illustrated above, if I ever switch to some other vendor I don't need to rewrite my BLL. Only those basic queries in the DAL would need to be rewritten. Having said that, I am finding it tough to envision a scenario in which this would happen. I can already make an EF model of an Oracle db, MSSQL is a given, I am pretty sure that MySql is possible as well (??) so I am not sure if the extra code would ever grant a worthwhile ROI.


Data acquisition, storage and management

I have a device that can measure different values over time, one sample per second. After one measurement run I can export the data in form of a CSV-file. One row per second with timestamp and about 20 columns (values). The question now is how to store these data masses to make the data accessable. I want to work with it using Matlab. I have for example 50 files of data, each representing one measurement run. Each containing around 120 tsd. samples of 20 values of type float, for example a temperature. It would be great if I could request all samples at the same temperature for example. So actually I am looking for a software that can handle and organize that data or a hint how (and what kind of) database to build. Thank you for your help!


Monitor Process

I have some previous posts talking about how to use python to "do something" when a record is inserted or deleted into a postgres database. I finally decided on going with a message queue to handle the "jobs"(beanstalkd). I have everything setup and running with another python process that watches the queue and "does stuff". I am not really a "systems" guy so I am not sure what is a good way to go about monitoring the process to make sure if it fails or dies that it restarts and sends a notification. Google gave some good ideas but I thought asking here I could get some suggestions from people that I am sure have had to do something similar. The process is critical to the system and it just needs to always work and if its not working then it needs to be addressed and other parts of the system "paused" until the problem is fixed. My thoughts were to just have a cronscript run every minute or two that checks to see if the process is running. If not it restarts it. Another script (or maybe just another function of the first) would be to monitor the jobs and if the jobs waiting to be processed hit a specific threshold to also flag that there is a major problem. Specifics about process... The process updates the orders in a legacy system with the qty's of items that are shipped or back ordered from our warehouse. SO if these things are not done then when the order is invoiced it will have incorrect qtys and the people involved wouldn't have a good way to spot this unless they are checking each line. I thought I might also have a flag on the order that says "yes i have been touched" and if its hasn't to just notify the invoice agent. This same method is going to be used for updating orders with shipping information based on when orders are shipped from UPS Worldship. I don't know, i think i have a handle on this but it just feels "kludgy".


c++ write own xml parser vs using tinyxml

I am currently in a task to generate an XML file for an srt text file containing timestamps and corresponding text. To generate an exe file which accepts file name input and outputs the relevant XML file to be used as part of an automated script. Is it Advisable to use Tinyxml for this? Edit: your comments regarding this are very much appreciated what's the easiest way to generate xml in c++?


Etymology of "String"

So it's obvious that a string of things is a sequence of things, and so a sequence of characters/bytes/etc. might as well be called a string. But who first called them strings? And when? And in what context such that it stuck around? I've always wondered about this.


How do you manage workflow tasks for a distributed team?

I work for a small software company which is responsible for delivering roughly a thousand custom software packages for roughly 100 customers. We are struggling at tracking the release process. The entire thing is pretty repeatable but, because of the different distribution processes, there are about 2 dozen steps from the time we sign a contract to the point a product goes out the door. To make matters more complicated, we have a few different 'types' of employees that are involved. We have a sales person who gets all requirements and deal terms. We have developers who do any modifications required by the customer. There is another type of employee which does the work of running the final build, testing and distributing the product. I'm looking for ideas on how people manage these sorts of processes as we look to fix some issues which have been plaguing us for a while. Primarily, we are seeing a lot of issues sequencing the events AND communicating the information associated with each product to the build/distribution team. Currently we use SVN(SCM), Jenkins/Hudson(Build) and Redmine(Feature/Bug Tracker). Are there software solutions or is this just an internal process we have to document and understand? I'd really like to find a way to keep everyone aware of what the status of a particular app is and notify people that they are expected to do something.


How should a senior programmer monitor another senior programmer?

I'm working with a new senior programmer who has almost the same amount of experience as me. He his own project to work on -- but I have to make sure he does not mess things up. Now, how can I monitor him since he's not junior? Do I examine his code? Cons of this are that I am not as deep into project as himself so it's time consuming for me (have my own project besides this). Do I only do QA from the perspective of another senior? Any advise here is appreciated. I was recently in the same situation where I relied that another senior will handle all tickets properly, and then it took me 3 weeks to fix his oversights. So I do not want to be in the same situation again.


Is there any Boost equivalent library for C?


Can the language make us stupid?

Do programming languages, that we are mainly coding in, really change the way we are thinking about problems? Sort of programming kind of the Sapir–Whorf hypothesis. And if they do, doesn't it really mean, that there **are** programming languages, which can make us, well, not stupid, but narrow-minded? **UPDATE:** this question is actually not about acknowledging the fact that we all should know at least three or four languages. This goes without saying. But what if there are some "dangerous" languages, which is better not to learn at all?


Why do people store shipping and handling in the order header and not a line item

I have worked on several ordering systems. Every one of them has tracked the shipping and handling as part of the order header rather then tracking it as a line item. To me, it would make more sense to keep them with the line items, even if the information is not displayed that way to the user. What are the reasons for keeping them in the header?


Explaining interfaces to beginning programmers?

I've had discussions with other programmers on interfaces (C#). I tried to use the analogy of interfaces being like a contract between programmers. Meaning that when you design to an interface, you are designing to a "thought out plan". This didn't fly. The other programmers (limited experience) couldn't get the concept. Or worse, refused to participate. How do you explain to people like that there **are** reasons to use interfaces? Thanks


Appropriate UML diagram

What is an appropriate UML diagram if I want to display how user request web page, enters some data, then posts the form (and if the validation has not succeeded, user is redirected back to requested web page)?


How do I avoid "Developer's Bad Optimization Intuition"?

I saw on a article that put forth this statement: > Developers love to optimize code and with good reason. It is so satisfying > and fun. But knowing when to optimize is far more important. Unfortunately, > developers generally have horrible intuition about where the performance > problems in an application will actually be. How can a developer avoid this bad intuition? Are there good tools to find which parts of your code really need optimization (for Java)? Do you know of some articles, tips, or good reads on this subject?


Where can I learn about hardware/software co-design?

I'm involved in an embedded software project where we also need to specify the target hardware. I come from a mostly software-only background, and would like to learn more about the simultaneous design of software and hardware. Are there any books/resources/courses out there that you would recommend?


When do 'static functions' come into use?

OK, I've learned what a static function is, but I still don't see why they are more useful than private member functions. This might be kind of a newb-ish question here, but why not just replace all private member functions with static functions instead?


How do you respond to: "Ever since the update..." questions from clients?

Ever since the update, people keep calling and saying "Ever since the update X, Y and Z are slow, bad and crashing" This has happened ever since the dawn of updates. What do people expect? Gamma comes after beta, and gamma testing always turns our users into The Incredible Hulks... Perhaps you've never heard this from a client, perhaps you're in college or a FLOSS Dev who can spread the blame around more than 5 or 6 guys, perhaps you unit test your code, perhaps you're not in that interesting situation where customers actually call you requesting the exact time of day you'll be releasing today's patch (I'd love to do that to Microsoft) or perhaps you're a sorry son-of-a-biscuit like me who just shipped a new update and went home and is dreading going back to work tomorrow. Anyway, ya'll are smarter than me anyway. How do you field criticism framed in "You must be a bad programmer because you're making your software worse"?


Getting users to write decent and useful bug reports

Does anyone know a good way to **_get users to write a semi-decent_** (read: _useful_ ) **_bug report_**? We wanted to put up something that would make sense to most users (be easy to read and understand), yet give useful information to developers as well. _**It does not work when I click the blue button! Ahhh, I just lost a week's work ... make it work._** isn't very useful, as it is. I started to fix about a list, but thought to check up with you guys, whether a similar method already exists.


How to make sure that reported issues are not caused by wrong credentials or typos of the client?

I have found myself a few times in the situation where a client reports an issue like ' _I can no longer login to my account_ '. Sure enough when trying to login with the client's credentials myself everything works. After that, you start testing in other environments and situations, but still it works every time. After numerous tests you start to wonder if the user is using the right credentials. Some clients get offended when asking this. Others are so sure that they enter the right credentials, they don't even bother trying the credentials that you send them. How can I make sure that the client is using the right credentials?


Not enough information in Bugs / Tickets

I work in a small team of developers that supports several pieces of software that a large multi-site company uses. We use Spiceworks to raise issues and support requests throughout the IT department not just developers. We constantly get tickets raised with the following or similar: "Function X is broken, please fix it, it is urgent" Now this statement is practically useless to me, and it wastes my time and theirs whilst I try to work out the problem often only to discover it is something they had not realised or that should be assigned to someone else. Now my question is in what ways could I try to get people to write more information in bugs? I have thought of several ideas such as a template but I am pretty sure they would be ignored. The only thing I can think of that would almost certainly work is to refuse to action any tickets not written correctly, but I have my doubts as to whether I would be allowed to do this. Incidentally the people raising the bugs tend to have trouble using basic computer functions so I cant ask them to do anything very technical without a great deal of effort. Thanks all


Is using F# good enough for learning the important functional programming concepts of Haskell?

I'm coming from Linux and Ruby. I've been interested in learning more functional programming, and in particular the ML-ish style. I've tried reading through the Real World Haskell book and trying some Haskell that way. But it's hard to learn this way for me because Haskell is very weird to me and I don't think I'll manage to really learn it until I try to do something real with it. That's why I'm considering learning F# instead, because I'm guessing that this way I can kill two birds with one stone: learn an ML-style functional language paradigm, and also learn Windows programming APIs (.NET libraries). This seems to be a more productive route than learning the Haskell library counterparts of all the Ruby libraries I've grown to love, but staying within the Linux/OSX universe. My question is, how sound is this reasoning? Is F# an adequate substitute for Haskell if you want to learn the programming ideas and techniques that Haskell teaches you?


Cons of working from home

I am a software developer for a large corporation, and currently work from home two days a week, and I absolutely love it. However, because of juggling of personnel, my team's office may get shutdown in the next couple of months. I have been asked my thoughts on this, and I'm not entirely sure. I love my two days at home, and wouldn't mind even four; but going to the office I feel is essential. When I'm at the office I have lunch with the other developers, share home cooked goodies, and discuss specifics of work. Because I'm also a fairly new member of the team, I'm still learning a lot, and occasionally one of the other team members have to show me how to do something that would be incredibly difficult to do over the phone or IM. For those of you who work from home full time and don't have an office to meet with your other co-workers, what are some problems that have occurred? How did you deal with them? Side note: I'm not concerned about work/home divide, I've got a spare room setup as my office (with only office stuff in it [standing desk, printer, books, etc]), and I'm in a relationship with no prospects of children, and my partner understands not to disturb me while I'm working).


Microsoft Visual Web Developer 2008 Express?

I just came across this while searching on Google for HTML/CSS tutorials. Does anyone recommend this software for building websites? Or should I just stick to learning pencil and paper hand coding instead? I just want to put my focus in the right area. Heres the link: http://msdn.microsoft.com/en-us/beginner/bb964635.aspx


How should object identification be managed?

I have a java/swing application in (hopefully good) MVC structure. Here is a overview of my model classes: ![enter image description here](http://i.stack.imgur.com/egVUN.png) One or more `worker`s may work at one `working location` and one `worker` may work at different `working location`s (not at the same time, of course). A `worker` may have different types of a `date` assigned. The `working location` has a list of all its `worker`s. Each `date` has a reference to its `worker`. All model objects are mutable. For managing purposes I implemented a `Database.java` which is responsible for storing the model classes in java collection classes and at program close saving all objects into an xml file (I use java simple xml framework for this task). It has the following three lists: `List<Working location>`, `List<Worker>` and `List<Date>`. So the procedure is:   1. Load xml file on program start   2. Add/edit/remove model-objects to/in/from database (working with the collections of Database.java   3. Save all model-objects from the Database collections into the xml file on program exit (If there is something bad in my mindset until now, please tell me a better way! I will really appreciate it.) * * * Here is the question:   **What is the proper way of identifying model-objects?** I can think of two possibilities:   1. Use object references      * (+) There is no extra code for handling the generation of new unique ids     * (-) "Everyone" can edit the objects (Because this is a private project "Everyone" means only me)   2. Use unique IDs for every object      * (-) more code     * (+) database may return copies of the model objects to be edited and only when the controller calls the database's methods with the copyied model objects they will be updated * * * **EDIT:** There was an important part which I forgot to mention: Multi-Threading and Multi-User   Both of them can certainly be answered with "No". The application will be some kind of one user planning software to replace the current "pen-and-paper- planning". I would say the main requirement is to avoid budgeting workers who are on holiday or not to forget to budget workers who come back from holiday the next day. Because this are the mistakes that often happen. Also there is no need for deeper analysis of the model objects and therefore no need for complex database queries _at the moment_. Therefore I like the idea of using XML to create a standalone application. Or is there a good reason to blow up the code to fulfill unlikely requirements?


any website monitoring library/modules to use in my website?

I'm trying to build a site which user can add their websites which should be monitored and can view a detailed report and statistics of it. And also it should be able to monitor local webservices (mainly), 1) is there any popular java library to use for monitoring a website? (in sense to ping a website and load some content etc., or to show whether site is up or not kinda) 2) Also to validate a flow of website (if possible)?   Example: Go to login page, find fields , fill fields and submit form and validate for successful login or not. I know this kinda looks big but any small part done can be helpful, I've found several of monitoring projects, but they only do normal websites but not local/other webservices and also they can't validate flow of website.


Have you used Grapple mobile?

I'm looking for a way to easily port content driven applications from one mobile platform to another. And recently I've came a cross a grapple mobile that claims that they can compile one code written in js and css to almost all platforms. Have you used it? Are such apps approved by apple? (AFAIK Apple restricted the development to objective-c, c, c++)


Collaboratively working with a WebDesigner - Best practices

I'm a programmer. I have always worked by myself. I usually do only back-end, but now I have a webproject that I want to hand the "View" part to a designer to make it beautiful. What I'm looking for are suggestions, best practices, recommended literature to make it easy and separate (easy to merge) for both parts. I googled a lot, so what I want is your personal opinion, experience on this subject. 1 - The back-end will be Java. 2 - Besides the back-end I haven't chosen (opinions ???) on what is best (JSF, only HTML (REST)) for the frontend Any help and insight is greatly appreciated Thanks in advance


Where do I find collaborators for hobby projects

I am one of those people who learn by doing, and I often get a new idea for a project beside work, which could be fun and perhaps later on profitable. I have had quite a few ideas, but I usually burn out, which is often because I am alone on the projects. Most of my collegues have kids, or don't want to use their spare time for hobby projects. Therefore it is often hard to find other people who I can work with on my hobby projects. My question is therefore, if there is a good place to find co-developers for small non-open source projects?


A class with extra field

Let's say I have an animal class...with fields of name, height and weight. I want to create a bird class which is an animal, but it has also, say, wing size. How can I do that? My general idea is creating the animal class, and the bird class which inherits animal, and has additional field ...but then different kinds of birds would inherit that class. **My Questions:**   * Is my solution an appropriate OO approach to this type of problem?   * Is there a known design pattern for handling data modeling problems of this type?


visibility:hidden Vs visibility:collapse

In CSS, what is the difference between visibility:hidden and visibility:collapse They are given to be separate in W3Schools, but I see no difference in their output. I have tried it in Google Crome.


Should classes, enums and other entities be placed in separate files?

My company's team lead\architect argues that a large-scale project is easier to understand if "entities connected by logic" are placed in one .cs file. I quote:   * "The whole structure of the logic and the interface and the class can be seen in one place, this is an argument which can't be refute. To see the same thing but with a bunch of files you need to use the tools, class diagram, R# for navigation, etc."   * "Following the poor theory I might scream that an army of separated files is cool, but when it comes to making changes to the existing code, especially if you were not a writer of this code, it's very difficult to understand plenty of scattered files. So on forums, you can write that "one enum- one file", but in practice this approach should never be used "   * "... As to the separation of code base between developers, nowadays it's not a problem edit simultaneously the same file. The merge is not a problem." I heard and read many times that we have to create one .cs file per enum, class and so on and this is the best practice. But I can't convince him. He says that he don't trust to any well-known programmers such as Jon Skeet. By the way here is Skeet's opinion on this topic: Where is the best place to locate enum types? What do you think? Is there a real problem? Or is it a matter of taste and should be regulated by the coding standard of the organization?


Basic premise on counting sort. How is k related to to Big Oh?

I am reading (Cormen) on counting sort.   I understand the structure of the algorithm but the statement: > In practice, we usually use counting sort when we have k = O(n), in which > case the running time is Theta(n). Is not clear to my mind. k is just the range of integers expected in the input. Why is the asymptotic notation used in this statement for k? I don't get it.


How do you structure unit tests for multiple objects that exhibit the same behavior?

In a lot of cases I might have an existing class with some behavior:               class Lion     {         public void Eat(Herbivore herbivore) { ... }     }      ...and I have a unit test...               [TestMethod]     public void Lion_can_eat_herbivore()     {         var herbivore = buildHerbivoreForEating();         var test = BuildLionForTest();         test.Eat(herbivore);         Assert.IsEaten(herbivore);     }      Now, what happens is I need to create a Tiger class with idential behavior to that of the Lion:               class Tiger     {         public void Eat(Herbivore herbivore) { ... }     }      ...and since I want the same behavior, I need to run the same test, I do something like this:               interface IHerbivoreEater     {         void Eat(Herbivore herbivore);     }      ...and I refactor my test:               [TestMethod]     public void Lion_can_eat_herbivore()     {         IHerbivoreEater_can_eat_herbivore(BuildLionForTest);     }               public void IHerbivoreEater_can_eat_herbivore(Func<IHerbivoreEater> builder)     {         var herbivore = buildHerbivoreForEating();         var test = builder();         test.Eat(herbivore);         Assert.IsEaten(herbivore);     }      ...and then I add another test for my new `Tiger` class:               [TestMethod]     public void Tiger_can_eat_herbivore()     {         IHerbivoreEater_can_eat_herbivore(BuildTigerForTest);     }      ...and then I refactor my `Lion` and `Tiger` classes (usually by inheritance, but sometimes by composition):               class Lion : HerbivoreEater { }     class Tiger : HerbivoreEater { }          abstract class HerbivoreEater : IHerbivoreEater     {         public void Eat(Herbivore herbivore) { ... }     }      ...and all is well. However, since the functionality is now in the `HerbivoreEater` class, it now feels like there's something wrong with having tests for each of these behaviors on each subclass. Yet it's the subclasses that are actually being consumed, and it's only an implementation detail that they happen to share overlapping behaviors (`Lions` and `Tigers` may have totally different end-uses, for instance). It seems redundant to test the same code multiple times, but there are cases where the subclass can and does override the functionality of the base class (yes, it might violate the LSP, but lets face it, `IHerbivoreEater` is just a convenient testing interface - it may not matter to the end-user). So these tests do have some value, I think. What do other people do in this situation? Do you just move your test to the base class, or do you test all subclasses for the expected behavior? **EDIT** : Based on the answer from @pdr I think we should consider this: the `IHerbivoreEater` is just a method signature contract; it does not specify behavior. For instance:               [TestMethod]     public void Tiger_eats_herbivore_haunches_first()     {         IHerbivoreEater_eats_herbivore_haunches_first(BuildTigerForTest);     }          [TestMethod]     public void Cheetah_eats_herbivore_haunches_first()     {         IHerbivoreEater_eats_herbivore_haunches_first(BuildCheetahForTest);     }          [TestMethod]     public void Lion_eats_herbivore_head_first()     {         IHerbivoreEater_eats_herbivore_head_first(BuildLionForTest);     }


Can Scrum use technical specifications in the Product Backlog rather than user stories?

At the company I am currently working for we started to do Scrum projects. It was not so hard to convince the managers to move from waterfall to Scrum. We're doing a project where we rebuild our platform from scratch. So (most) functionality is known and most improvements are rather technical. In this it could be justified to have technical tasks rather than user stories. Our backlog has got all kinds of technical tasks like:   * Rewrite DB class from MySQL to PostgreSQL.   * Implement system logging.   * Rewrite object cache. Things that come up during the stand-ups include that long "research tasks" are wanted, but they are never done. Also, the team members claim in the middle of the sprint that unplanned tasks need to be added. How should a Scrum Master deal with this? Could it be that for this kind of project, Scrum is NOT the way to go?


Best practices for caching search queries

I am trying to improve performance of my ASP.net Web Api by adding a data cache but I am not sure how exactly to go about it as it seems to be more complex than most caching scenarios. An example is I have a table of Locations and an api to retrieve locations via search, for an autocomplete.               /api/location/Londo      and the query would be something like               SELECT * FROM Locations WHERE Name like 'Londo%'      These locations change very infrequently so I would like to cache them to prevent trips to the database for no real reason and improve the response time. Looking at caching options I am using the Windows Azure Appfabric system, the problem is it's just a key/value cache. Since I can only retrieve items based on keys I couldn't actually use it for this scenario as far as Im aware. Is what I am trying to do bad use of a caching system? Should I try looking into NoSql DB which could possibly run as a cache for something like this to improve performance? Should I just cache the entire table/collection in a single key with a specific data structure which could assist with the searching and then do the search upon retrieval of the data?


Does anyone do hardware benchmarks on compiling code?

I've seen a bunch of sites that benchmark new hardware on gaming performance, zipping some files, encoding a movie, or whatever. Are there any that test the impact of new hardware (like SSDs, new CPUs, RAM speeds, or whatever) on compile and link speeds, either linux or windows? It'd be really good to find out what mattered the most for compile speed and be able to focus on that, instead of just extrapolating from other benchmarks.


Setting $_POST variables as a means of passing data / Not passing parameters in functions

I've got a legacy PHP web application wherein almost each and every function makes references to $_POST variables - retrieving their values, AND **setting them (or setting new POST variables)** as a means to communicate with the calling code or other functions. eg:               function addevent()     {     ...     $add_minutes=$_POST['minutes'];          ...     $_POST['event_price']='';      ...     }      I would have thought that the straightforward approach would have been to pass to a function all the values that it needs, and return all what they generate. As an old-school programmer, albeit a bit out of touch now, I find this structure grotesquely unsettling - where data is passed arbitrarily all over the place. What do others think? Is the above approach acceptable now? * * * Edit 1 One conceivably genuine use-case is as follows. This is a function which handles embed tags or an uploaded file.               function brandEvent($edit_id='')     {     ...         switch($_POST['upload_or_embed'])         {             case 'embed':             ...             // uses $_POST['embed_video_code']             ...             break;             case 'upload':             ...             // uses DIFFERENT POST variables             ...         }     }      Is this a sensible code structure?


When to mark a user story as done in scrum?

There is a notion in scrum that emphasizes **delivery of workable units** at the end of each sprint. Each workable unit also maps directly of indirectly to a user story and when in new sprint PO introduces new PBI (new user stories), this means that practically team can't always go back to previous user stories to do the rest of the job, which in turn means that when you implement a user story, you should do it as complete as it's known to the team in that time, and you shouldn't forget anything (something like "I'm sorry, I've forgotten to implement validation for that input control" or "I didn't know that cross- browser check is part of the user story"). At the other hand, test, backward compatibility, acceptance criteria, deployment and more and more concepts come after each user story. So, when can team members know that the user story is done **completely** , not just for demo, and start a new one?


Learning C, C++ and C#

I'm sure you guys are tired of this question but after wading through hours of similar posts and questions I've really not made any progress to my specific concerns. I was hoping you guys could shed some light on a couple of questions I have before I decide on a course of action. BACKGROUND: I'm wanting to enroll in some type of program to learn a programming language/get a certificate/degree to work in the field. I've always been interested and bought a book on VB back in high school and dabbled. Now I want to get serious after a huge hiatus. Question 1: I've read it's counter-productive to learn C first, then C++ or C# because you develop bad habits. In a lot of college courses I've looked at, learning C/C++ is mandatory to advance. Should I ever bother learning C? On a related note, I really don't understand the difference between C and C++, or C# for the matter other than it incorporates .NET (which, I understand, is a compilation of tools and libraries that make programming easier and faster). Question 2: Where did you guys learn to program? Where do you recommend? Is it possible to land a job programming being self-taught? Is my best chance an ITT tech or a regular college? I was going to enroll in a JC and go from there but I can't decide what to do. LAST question :) I heard C++ is being "ported" to .NET. True? And if so, is this going to make C++ a solid, in-demand language to learn? Thanks for looking. :)


Is learning how to use C (or C++) a requirement in order to be a good (excellent) programmer?

When I first started to learn how to program, _real_ programmers could write assembly in their sleep. Any serious schooling in computer science would include a hefty bit of training and practice in programming using assembly. That has since changed, to the point where I see Computer Science degrees with assembly, if included at all, is relegated to one assignment, and one chapter, for a total of two weeks' work out of 4 years' schooling. C/C++ programming seems to have followed a similar path. I'm no longer surprised to interview university graduates who have not spent more than two weeks programming in C++, and have only read of C in a book somewhere. While the most serious CS degrees still seem to include significant time learning and using one or both of the languages, the trend is clearly towards less enforced C/C++ in school. It's clearly possible to make a career producing good work without ever reading or writing a single line of C or C++ code. Given all of that, is learning the two languages worth the effort? Are they at all required to excel? (beyond the obvious, non-language specific advice, such as "a good selection of languages is probably important for a comprehensive education", and "it's probably a good idea to keep trying out and learning new languages throughout a programmers' career, just to stretch the gray cells")


Can one can survive in the IT industry without knowledge of C and C++?

I am just a graduate from India and I have knowledge of Java, JSP and Servlets, Android application development and some iOS development. I do not have a background in C or C++ and a little weak background in Data Structures and Algorithms. I want to know whether I can make a successful career in the IT industry without knowledge of C or C++ but having a strong grasp on Java and Python (which is what I am thinking of learning next). As for the Data Structures and Algorithms part I am planning to study them again with implementation in Java as I am not fluent in C or C++. Can I go good in future if I know Data Structures through Java?


Jenkins to automate deployment of ASP.NET applications

Is there any possibility to automate/semi-automate deployments of ASP.NET web applications using Jenkins. It can be under controlled or uncontrolled environments, for uncontrolled user needs to enter userid and password. I am looking out for ways to copy the files from target to destination and run sql scripts in web farm scenario. **Edit** Currently we are using bat files to xcopy/configure app pool/sql cmd, etc to deploy the application. But for this to work, production support team needs to download the source code, build the project and run the bat files to deploy the application. Now, we want to automate the deployment without user downloading the source code and end user just needs to visit a url and fill userid and password parameters and select svn tag and it should get deployed. But Jenkins is running under anonymous login, so the existing bat file will not work since it doesn't have permissions to run the script. So, I would like to know if there exists any alternatives for this kind of situation. It will be good if user context is impersonated by using entered userid and password allowing existing batch file to run without further changes. If it is not possible, we would like to explore other ideas too but we don't have flexibility to choose a automated tool like puppet, etc, we should stick around with these batch files.


Custom Alphabetic Sorting of Array in Java

I have a requirement to read a text file with lines in tag=value format and then output the file with specific tags listed first and the rest sorted alphabetically. The incoming file is randomly sorted with the exception of the first line. The output needs the first two lines to always be the same. For example, given the following tags:               NAME     AGE     SSN     MARITAL_STATUS     NO_OF_DEPENDENTS      The input will always have NAME first and the remaining tags (there are literally hundreds) sorted randomly. The output needs to have SSN first and NAME second and the rest sorted alphabetically so I would end up with:               SSN     NAME     AGE     MARITAL_STATUS     NO_OF_DEPENDENTS        Note: These are just sample tags. The actual file has 13 fields which need to be listed first and the remaining few hundred listed alphabetically. I'm trying to figure out the best way to do the sorting. Right now my plan is to read the lines in the incoming file and marshal them into two List objects. The first will contain the specific tags which need to be placed first and the second will have everything else. I will then sort the second list and merge it into the first list. This seems complicated and I feel like I'm missing an easier or more elegant approach.


What are some good online coding log/management tool?

I am looking for an online, free coding management tool, where I could log my coding process, for example, bugs to be fixed and has been fixed. What are some good recommendation?


Where should I put my method

I am writing a Java program using the MVC design pattern. I have classes `Item` and `Supplier`. In the database they are connected through a `item_supplier` table. I'm writing a method which will give me all suppliers for a specific item (using itemID): `public ArrayList<Supplier> getItemSuppliers(int itemID)` I have a DB layer as well and I have `DBItem` and `DBSupplier`. Where should this method go? I will use it only (mostly) on my `ItemUI` so I am thinking of `DBItem` as the correct place. \-- Usually when we have the SalesLineItem pattern (Sales * - 1 SalesLineItem 1 - * Item) we have a separate class, but in that case, do I need such as my only interaction with that table (`item_supplier`) will be with this printing (and one updating) method? Basically, do I need to do a `ItemSupplier` model layer class and respectively `DBItemSupplier` or can I just have those two methods `getItemSuppliers` and `updateItemSuppliers` on either `DBItem` or `DBSupplier` (and if the latter, where?)


Is SRP (Single Responsibility Principle) objective?

Consider two UI designers who want to design "user attractive" designs. "User attraction" is a concept that is not objective and only resides in the mind of designers. Thus designer A could for example pick up red color, while designer B picks blue. Designer A create a layout which is entirely different from designer B, and so on. I read about SRP (Single Responsibility Principle) and what I understood was kind of a subjective analysis or break down of responsibilities that can vary from an OO designer to another OO designer. Am I right? In other words, is it possible to have two excellent object oriented analyzer and designer who come up with two different designs for one system based on SRP principal?


How can I choose what to use to write my next webservice in C#?

I'm about to write some webservices from scratch and I'm a bit confused about the approach to take. The obvious choices were WCF and MVC 4 Web API, but I am having a hard time deciding. The two factors that are important are making it self-describing (eg, MEX etc.) and easy to consume (Maybe RESTful?). I'm struggling to pick which one to discard in favour of the other. The way things are going, I'm hearing more and more about REST so I should probably go in that direction, but apparently that's also possible to implement using WCF. I'm quite torn about how best to proceed, and there isn't a lot of information out there saying "Oh, these days developers always use X because Y" so it's tricky to judge the merits of each, and how easy those merits are to implement.


Do donations count as "commercial use"?

Lets say I'm building community that uses some webapp. These webapp uses a a modified version a a GPLv2 licensed theme. Additionally the community uses a donation mechanism to fund itself. Donation overheads will be given back to the community in some form, so there is no commercial goal behind it. Questions:   1. Am I required to publish the modified version of the theme if I only use it?   2. Is this "commercial use" in terms of the GPL? (I'm not sure it this is the right SE site)


Using a microframework, or rolling your own

I really like a microframework in Python called Flask. I have used it for the past 2 months, and I find it excellent. Now, I would like to use it in deployment, but, there are a few things I'm afraid of. Firstly, even though its a microframework, it depends on Werkzeug (a WSGI framework type of thing), which, in case I run into a problem, makes it more difficult to debug stuff. Second, its not extremely popular, which means that support would be difficult to get. So, what I was thinking is I could roll my own microframework in Python that doesn't have all the features of Flask, but, only the ones I need, and I would know it through and through and could fix any problems that I might encounter, I estimate this will take 1000-2000 lines, and about 2-3 weeks for me, and probably a lot less with a team of 2. What do you guys suggest?