title: Force user to extend class or use configuration

text: What is better practice: force user to extend abstract class or make class with configuration? Eg. pseudocode:               ClassA{      this.name      this.weight      this.height      this.width           constr(config){       this.name = config.name       this.weight = weight       this.height = height       this.width = width      }     }      or               abstract ClassA{      this.name      this.weight      this.height      this.width     }          ClassB extends ClassA{      this.name = 'Item'      this.weight = 12      this.height = 11      this.width = 14     }      Until now i was using configuration because most libraries use this method, but whats wrong with second method? I recently found that method with extending is producing clearer code but maybe I am missing something?


title: Alternatives to Perl/python scripts for find & replace

text: I'm working in a fairly old yet sufficiently unproductive code base that I need to create a(some) script(s) to help me out. For example:   * we add a version # and timestamp at the header of the file (yes we use a CVS based sys but this is beyond my control).   * we have duplicated layout code for different languages (this is pre-unicode era so we just duplicate things) and when a control's attribute changes in one language that change needs to be cascade to the other ones.  So, my first thoughts were a couple of perl or python scripts to do find & replace to solve those two issues. But I wanted to reach out and see if anyone else had a different approach.


title: Making a design for a Problem

text: I have written many codes using OOPS and I am still to understand when is a code good enough to be accepted by experts. The thought procedure of every man is different and so is the design. My question is should I do something in particular to design my programs in such a way that they are good enough to be accepted by people.   Other thing I have also read Head First Object Oriented Design but at last I feel that the way they design the problems is much different I would have designed them.


title: MVC for our application?

text: There are some issues about how to manage our program designs and programming styles. I was assigned to find a solution to write reusable code - though, the programming team does not follow the rules. I would rather use MVC to perform a well structured programming style. I found out that a blueprint for next works requires a bunch of experts. The thing is that I have to do it all myself. And the worse part is that I have to use a general MVC platform. I need your helps and suggestions for:   1. Is there a way that I can write a document for MVC - to use it in our design in Java?   2. How can I represent it?   3. How much work does it need?   4. How can I connect the Model, the View, and the controller parts together?


title: Is it common to declare class properties at the bottom of the class declaration?

text: I work in a PHP development shop and several new developers have joined the team. One of the new members insists on declaring class properties at the bottom of the class declaration rather than the at the top, as one would normally expect. In all my 5 years of working in web development, I have never seen this done. Is it a common coding style?


title: What are the advantages of using the Java debugger over println?

text: I always use `System.out.println(...)` to debug my code, and it works pretty well. In which cases do you use the eclipse java debugger? I never had to use it and the little bug symbol is still ab bit mysterious to me. Are there cases where the debugger helps me that I can´t solve with a println?


title: Some advice concerning Oracle and Java

text: I've seen the news yesterday that Java 7 and Java 8 passed but the majority weren't very happy. Can anyone clarify what consequences does this have on Java and the community ? What licenses did Oracle change to be exact? A lot of people think that this might be the end of Java. Should I go ahead with learning Java or should I maybe move to .NET ? I don't have any preference as to one or the other, but I'm a bit concerned now with all this pressure surrounding the Java ecosystem. Since time is important for everyone and time is what I have less have these days I'd like some advices from the community here.


title: Professional Developers, may I join you?

text: I currently work in technical support for a software/hardware company and for the most part it's a good job, but it's feeling more and more like I'm getting 'stuck' here. No raises in the 5 years I've been here, and lately there seems to be more hiring from the outside than promotion from within. The work I do is more technical than end-user support, as we deal primarily with our field technicians who have a little more technical skill than the general user base. As a result I get into much more technical support issues... often tracking down bugs in our software, finding performance bottlenecks in our database schema, etc. The work I'm most proud of are the development projects I've come up with on my own, and worked on during lunch breaks and slow periods in Support. Over the years I've written a number of useful utilities for the company. Diagnostic type applications that several departments use and appreciate. These include apps that simulate our various hardware devices, log file analysis, time-saving utilities for our work processes, etc. My best projects have been the hardware simulation programs, which are the type of thing we probably wouldn't have put a full-time developer on had anyone thought to do it, but they've ended up being popular and useful enough to be used by development, QA, R&D, and Support. They allow us to interface our software with simulated hardware, rather than clutter up our work areas with bulky, hard to acquire equipment. Since starting here my life has moved forward (married, kid, one more on the way), but it feels like my career has not. I still earn what I earned walking in the door my first day. Company budget is tight, bonuses have gone down, and no raises or cost of living / inflation adjustments either. As the sole source of income for my family I feel I need to do more, and I'd like to have a more active role in _creating something_ at work, not just cleaning up other people's mistakes. I enjoy technical work, and I think development is the next logical step in my career. I'd like to bring some "legitimacy" to my part-time development work, and make myself a more skilled and valuable employee. Ultimately if this can help me better support my family, that would be ideal. Can I make the jump to professional developer? I have an engineering degree, but no formal education in computer science. I write WinForms apps using the .NET framework, do some freelance web development, have volunteered to write software for a nonprofit, and have started experimenting with programming microcontrollers. I enjoy learning new things in the limited free time I have available. I think I have the aptitude to take on a development role, even in an 'apprentice' capacity if such an option is possible. Have any of you moved into development like this? Do any of you developers have any advice or cautionary tales? Are there better career options I haven't thought of? I welcome any and all related comments and thank you in advance for posting them.


title: GPL Confusion! Can I sell a product with GPL covered components without making the source available?

text: I'm really confused.. I'm looking into making a commercial program and there are a few open source, GPL covered components i'd like to use.. Am I allowed to sell my product with the components in without distributing my source? For example.. say i was making a commecial text editor, and my friend has a really awesome GPL free-software text editor.. But i wanted to make a text editor like his but with special features.. Am I allowed to fork his text editor add all my special features and sell it on without having the source code to my special features available to my users?


title: Does it matter the direction of a Huffman's tree child node?

text: So, I'm on my quest about creating a Java implementation of Huffman's algorithm for compressing/decompressing files (as you might know, ever since Why create a Huffman tree per character instead of a Node?) for a school assignment. I now have a better understanding of how is this thing supposed to work. Wikipedia has a great-looking algorithm here that seemed to make my life way easier. Taken from http://en.wikipedia.org/wiki/Huffman_coding: >   * Create a leaf node for each symbol and add it to the priority queue. >   * While there is more than one node in the queue: >     * Remove the two nodes of highest priority (lowest probability) from the > queue >     * Create a new internal node with these two nodes as children and with > probability equal to the sum of the two nodes' probabilities. >     * Add the new node to the queue. >   * The remaining node is the root node and the tree is complete. > It looks simple and great. However, it left me wondering: when I "merge" two nodes (make them children of a new internal node), **does it even matter what direction (left or right) will each node be afterwards?** I still don't fully understand Huffman coding, and I'm not very sure if there is a criteria used to tell whether a node should go to the right or to the left. I assumed that, perhaps the highest-frequency node would go to the right, but I've seen some Huffman trees in the web that don't seem to follow such criteria. For instance, Wikipedia's example image http://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Huffman_tree_2.svg/625px- Huffman_tree_2.svg.png seems to put the highest ones to the right. But other images like this one http://thalia.spec.gmu.edu/~pparis/classes/notes_101/img25.gif has them all to the left. **However, they're never _mixed up_ in the same image (some to the right and others to the left)**. So, does it matter? Why?


title: Where do utility libraries fit in a layered architecture?

text: Consider this mock-up of a software stack designed with layered architecture in mind : ![Basic example of a layered-structured software stack.](http://i.stack.imgur.com/RQCSF.png) Every application layer is decoupled through API calls, but a memory handling library is used throughout. All layers need to copy, allocate or somehow affect memory. Is this bad use of the layered architecture pattern, or is it one of its pitfall ? On one hand, trying to force the pattern upon the library calls, perhaps by adding memory handling wrappers to every application layers, would create a lot of boilerplate code. On the other hand, letting layers, through library calls, create arbitrary entry points into different layers seems to contradict the very rationale behind layered architecture.


title: Would it be useful for a programmer to get qualified in Prince2

text: Even if the programmer wasn't going to perform the function of project manager, would there be any benefit on a small team of one of the devs being Prince2 qualified?


title: Amnesic Environment

text: My team is looking for a technical term which may or may not exist. We are trying to describe an environment, such as a database, which has been built up over time with little or documentation about the change process that has gone into it. Generally these are legacy systems who's original developers have long since moved on and they are in such a tangled and unmanageable state that the only way to recreate the environment, say for testing purposes, is to copy it and do your best guess at re-configuring it for its new purpose. So far the best term we have come up with is `Amnesic`, such as "setting up the new test environment is going to be a challenge because it is an amnesic db." However, we are still not quite happy with the term and were wondering if a better and/or more accepted term for this situation exists.


title: Forking a repo on GitHub but allowing new issues on the fork

text: I have previously forked other people's repos on GitHub, and I have noticed that issues stay with the original repo, and that I can't file issues on the forked repo. I now have the following task. I am working for a small business where development was being done by one of the principals on his personal account. He has amicably left the project, and we would like to migrate that project away from his personal account to a new "role" account on GitHub. I would naturally fork the repo, in order to preserve the code history, but then I'll end up with a repo where we can't file new issues, which is quite undesirable. How can I make a copy of this original repo into our new account, ideally still preserving code history, but be able to file new issues within this new account?


title: How do I convince my boss that it's OK to use an application to access an outside website?

text: That is, if you agree that it's OK. We have a need to maintain an accurate internal record of bank routing numbers, and my boss wants me to set up a process where once a week someone goes to the Federal Reserve's website, clicks on the link to get the list of routing numbers (or the link giving the updates since a particular date), and then manually uploads the resultant text file to an application that will make the update to our data. I told him that a manual process was not at all necessary, and that I could write a routine that would access the FED's routing numbers in the application that keeps our data updated, and put it on whatever schedule was appropriate. But he is greatly opposed to doing this, and calls it "hacking the Federal Reserve website." I think he's afraid that the FED is going to get after us. I showed him the FED's robot.txt file, and the only thing it forbids is an automated indexing of pages with extension .cf*:               User-agent: *    # applies to all robots     Disallow:   CF   # disallow indexing of all CF* directories and pages      This says nothing about accessing the same data automatically that you could access manually. Anyone have a good counterargument to the idea that we'd be "hacking" the FED?


title: Is it a bad practice to include all the enums in one file and use it in multiple classes?

text: I'm an aspiring game developer, I work on occasional indie games, and for a while I've been doing something which seemed like a bad practice at first, but I really want to get an answer from some experienced programmers here. Let's say I have a file called `enumList.h` where I declare all the enums I want to use in my game:               // enumList.h          enum materials_t { WOOD, STONE, ETC };     enum entity_t { PLAYER, MONSTER };     enum map_t { 2D, 3D };     // and so on.          // Tile.h     #include "enumList.h"     #include <vector>          class tile     {         // stuff     };      The main idea is that I declare all enums in the game in **1 file** , and then import that file when I need to use a certain enum from it, rather than declaring it in the file where I need to use it. I do this because it makes things clean, I can access every enum in **1 place** rather than having pages openned solely for accessing one enum. Is this a bad practice and can it affect performance in any way?


title: add a prefix to localhost

text: Is there any possibility to add a prefix before localhost? My question is that I want to add a prefix before localhost for my project url (ie. "dev.localhost/project/default.htm"). This is for an ASP.NET application running in IIS.


title: HTML markup vs programmatic JS

text: I've been thinking about the consequences of using programmatic JavaScript components versus HTML markup. For example I looked into the Enyo Framework, which has its power in composition. One can build components composed of simpler components, and at the end they may be built from tags, but one doesn't write HTML Markup with it. I also thought that it would be possible to develop a swing-like UI library which renders itself on an HTML5 canvas. There also would be no need for any markup. But is there a need for this? Isn't HTML5 capable enough for these goals? I did some brain storming on a webapp similar to draw.io where there would be many Items which need to be resizable and draggable. They would need to be connected, transformed, rotated, etc., and all of that needs to be obvious from varying the borders of items, and other UI clues. Is it possible to achieve this with HTML5, or since I have to code a lot anyway, would there be any harm to use only Javascript components without HTML markup? What are the trade-offs and what yields more pain?


title: Recommendations for teaching junior programmers good coding style

text: I am a big fan of good coding style, producing clean, clear code that runs well and is easy to use and integrate into larger systems. I believe that we programmers are essentially craftspeople who should take pride in our work, every line. I am not fond of code that is inconsistently formatted, cluttered with commented out experimental code, and rife with unhelpful or misleading function and variable names. But I sometimes find it hard to argue with code like this that basically works. If you think that coding style matters, I am looking for recommendations for ways of teaching good, professional coding style to the junior programmers under me. I want them to take pride in their work, but my concern is that they appear to become satisfied when their code just barely works, and seem to have no interest in producing what professionals like me would consider professional code. On the other hand, if you think coding style is not particularly valuable, I welcome your comments and am open to reconsidering my standards and tolerances. I know the usual arguments in favor of good code: comprehensibility, ease of maintenance, etc., but I would also like to hear some rebuttals to arguments like "it works, what more do you want?" In our industry we can use the compiler to hide a multitude of sins. Clean code and messy code can both lead to identically functioning programs, so does cleanliness matter, and if so, why? [While there are several existing questions on coding style, I didn't find any that related to teaching methods and ways to instill good coding style in junior programmers.]


title: Depending on another open source library: copy/paste code or include

text: I'm working on a large class and started implementing new features that need graphics. I started writing the graphics functions myself, but I know that open source libraries exist that can provide me with this functionality without me having to write it myself. The problem is that I prefer the class to be self-sufficient and not dependent on any other library. If I don't write it myself, I would have to ask the user to make sure a graphics library is already installed (less user-friendly). If I write it myself, I do a lot more work than I have to. I could also copy/paste some of the relevant code into my own class, but not sure about the disadvantages of doing this (it's an open source library that matches my license, so I'm not concerned with legality, just programming-wise if there are disadvantages). So what should I do:   * copy paste code from the external library   * write the code myself so it's truly self-sufficient   * ask the user to download and install another library


title: Is it dangerous for me to give some of my Model classes Control-like methods?

text: In my personal project I have tried to stick to MVC, but I've also been made aware that sticking to MVC too tightly can be a bad thing as it makes writing awkward and forces the flow of the program in odd ways (i.e. some simple functions can be performed by something that normally wouldn't, and avoid MVC related overheads). So I'm beginning to feel justified in this compromise: I have some 'manager programs' that 'own' data and have some way to manipulate it, as such I think they'd count as _both_ part of the model, and part of the control, and to me this feels more natural than keepingthem separate. For instance: One of my Managers is the PlayerCharacterManager that has these methods:               void buySkill(PlayerCharacter playerCharacter, Skill skill);     void changeName();     void changeRole();     void restatCharacter();     void addCharacterToGame();     void createNewCharacter();     PlayerCharacter getPlayerCharacter();     List<PlayerCharacter> getPlayersCharacter(Player player);     List<PlayerCharacter> getAllCharacters();      _I hope the mothod names are transparent enough that they don't all need explaining._ I've called it a manager because it will help manage all of the PlayerCharacter 'model' objects the code creates, and create and keep a map of these. I may also get it to store other information in the future. I plan to have another two similar classes for this sort of control, but I will orchestrate when and how this happens, and what to do with the returned data via a pure controller class. This splitting up control between informed managers and the controller, as opposed to operating just through a controller seems like it will simplify my code and make it flow more. My question is, is this a dangerous choice, in terms of making the code harder to follow/test/fix? Is this somethign established as good or bad or neutral? I oculdn't find anything similar except the idea of Actors but that's not quite why I'm trying to do. **Edit:** Perhaps an example is needed; I'm using the Controller to update the view and access the data, so when I click the 'Add new character to a player button' it'll call methods in the controller that then go and tell the PlayerCharacterManager class to create a new character instance, it'll call the PlayerManager class to add that new character to the player-character map, and then it'll add this information to the database, and tell the view to update any GUIs effected. That is the sort of 'control sequence' I'm hoping to create with these manager classes.


title: What alogrithm is used on the smart cards for the DNSSEC Trusted Community Representatives?

text: I've been doing some reading about DNSSec and am interested in the algorithm that they chose to use when splitting the trusted key up between the 7 Trusted Community Representatives (TCR). I unfortunately can't find any information about the algorithm itself anywhere. Is it just an implementation of the Shamir Secret Sharing Algorithm, or is it using a different approach? A little bit of information can be found here.


title: Why setter method when getter method enough in PHP OOP

text: I am practicing OOP with PHP, and I am struck at setter and getter methods. I can directly access the class properties and methods with getter method then what's the use of setter method? See my example.               <?php     class MyClass{         public $classVar = "Its a class variable";         public function Getter(){             return $this -> classVar;         }     }     $obj = new MyClass;     echo $obj -> Getter();     ?>


title: Is it a good idea to format the code in eclipse using auto format

text: I use eclipse for coding, and the language which we use is Java. Once it was suggested by someone that to properly format the code, using the auto formatter(CTRL+SHIFT+F) While this command does format the code, but sometimes I feel that overall look becomes weird, and it is not actually very readable. So is this a recommended thing to do? If not what is the better of formatting our code in eclipse ?


title: When is optimization not premature and therefore not evil?

text: "Premature optimization is root of all evil" is something almost all of us have heard/read. What I am curious what kind of optimization not premature, i.e. at every stage of software development (high level design, detailed design, high level implementation, detailed implementation etc) what is extent of optimization we can consider without it crossing over to dark side.


I recently asked a question on Stack Overflow to find out why isset() was faster than strlen() in PHP. This raised questions around the importance of readable code and whether performance improvements of micro-seconds in code were worth even considering. My father is a retired programmer, and I showed him the responses. He was absolutely certain that if a coder does not consider performance in their code even at the micro level, they are not good programmers. I'm not so sure - perhaps the increase in computing power means we no longer have to consider these kind of micro-performance improvements? Perhaps this kind of considering is up to the people who write the actual language code? (of PHP in the above case). The environmental factors could be important - the Internet consumes 10% of the world's energy. I wonder how wasteful a few micro-seconds of code is when replicated trillions of times on millions of websites? I'd like to know answers preferably based on facts about programming. **Is micro-optimisation important when coding?** My personal summary of 25 answers, thanks to all. Sometimes we need to really worry about micro-optimisations, but only in very rare circumstances. Reliability and readability are far more important in the majority of cases. However, considering micro-optimisation from time to time doesn't hurt. A basic understanding can help us not to make obvious bad choices when coding such as               if (expensiveFunction() || counter < X)      Should be               if (counter < X || expensiveFunction())      (Example from @zidarsk8) This could be an inexpensive function and therefore changing the code would be micro-optimisation. But, with a basic understanding, you would not have to, because you would write it correctly in the first place.


title: What optimizations are premature?

text: I've been here for nearly a month and it seems that people have a tendency to be eager to use the "Premature Optimization is the root of all evil" argument as soon as someone mentions efficiency. What is really a premature optimization? What is the difference between what is essentially writing a well designed system, or using certain methods and premature optimizations? Certain aspects that I feel should be interesting topics within this question:   * In what way does the optimization influence code complexity?    * How does the optimization influence development time/cost?    * Does the optimization emphasize further understanding of the platform(if applicable)?    * Is the optimization abstractable?    * How does the optimization influence design?    * Are "general solutions" the better choice instead of specific solutions for a problem because the specific solution is an optimization? EDIT / update: Found these two links that are very interesting regarding what a premature optimization really is:   http://smallwig.blogspot.com/2008/04/smallwig-theory-of-optimization.html   http://www.acm.org/ubiquity/views/v7i24_fallacy.html


title: Is premature optimization always bad?

text: I work in a small sized software/web development company. I have gotten into the habit of optimizing prematurely, I know it is evil and promotes bad code, but I have been working at this firm for a long while and I have deemed this as a necessary evil. It has never caused me an issue so far in the past, but it might if I get partners or a successor. Should I change my current practice now to prepare for that case, or should I not worry about it?


title: The cross-over between designing for performance/pre-mature optimisation

text: > **Possible Duplicate:**   >  When is optimization not premature and therefore not evil? Whilst designing my own .Net SQL access library, I found that I want everything thing to run as fast as possible so I tend to look at the fastest ways of doing things. This often gets criticised as pre-mature optimisation when I am just looking for the fastest way of doing something. My question is there a cross-over between designing for performance and pre- mature optimisation?


title: How do you control nodes in a server farm?

text: I've been reading about hadoop and multi-node setups, and it says in the documentation that you must have a JVM and hadoop software already running on those nodes. My question is, do people install this software on each of these computers individually? or is there a software solution that automates this process? I've also read about KVM switches, but I'm not sure whether this is what people usually use in these situations.


title: How to Evaluate a Programmer's Communication Skills

text: If I was interested in interview questions like "Describe how you explained a difficult technical issue to a non-technical person" I would use the Googles to search on communication skill interview questions.. But, what I really would like is to have someone actually explain _to me_ some sort of relatively difficult technical issue. So I'm interested in are answers that identify a useful topic for this purpose or examples of what others have do to create scenarios for the purpose of evaluating a candidate's communications. In other words some exercise that actually forces the candidate to communicate something challenging rather than describe some time in their past when they were required to do so.


title: Which language should I use for a computationally intensive program?

text: This is a multi-part question. I am writing a computationally intensive program that will perform computations on very large numbers, on the scale of factorial(100) . I'm considering using Java or C++ (that's all I know, and C++ only slightly) but I'm not sure which would be better to use in this context. I know C++ will be faster, but Java has a built-in utility for large numbers, the BigInteger class, and I don't know of any equivalent in C++. So here are the questions...   1. Is C++ so much faster than java as to make it worth it to learn and find a way to handle large numbers?   2. If I should use C++, how would I handle the large numbers?   3. Is it possible to just specify a new data type in C++ that represents a number, but with larger bounds than the int?


title: Should SpecFlow be used with BDD as a solo developer?

text: I am a long time fan of TDD and after reading the RSpec book, would like to transistion to a BDD process. I like the idea of driving from the outside in, as it is presented in the book. What I am having a hard time getting a handle on is how to structure the tests. I have tried SpecFlow, but it seems cumbersome to use when I am the only one really ever going to be looking at the tests. I like the idea of just using straight NUnit, rather then adding another framework, like it is presented here. Is this a good way to try and structure BDD tests? Is there more information out there on comparing the two ways (that may even be more recent)?


title: Would be semantically correct to make a “Login” constructor in an api class?

text: Since the methods of the class will only work if the user is logged in, is it right or is there some problem that might make my code slow/inneficient?


title: What is the right way to develop ASP.NET applications in order to separate data access from data visualization?

text: I'm currently involved in a migration to TFS from SVN of a large project that is going to be divided into five different sites. This project allows some providers to insert five different product data into the enterprise DB. Like a lot of companies out there, we have a _technological debt_ that should be solved (or at least, reduced) with this new project organization. However, I'm quite new to ASP.NET and also our software is still running 2.0 .NET, so maybe I'm missing something or things should be done in a different way nowadays with 3.5+. One of those five different parts is going to be a new one. This is the one I'm going to develop. In order to achieve high degree of modularity, the code of the current project is divided into several DAO ( _Data Access Object_ ) under App_Code, `*.ascx` modules living in different parts of the project structure, VB classes that inherit from `System.Web.UI.*` (for **each** control that is displayed on the web) under App_Code, and lots of stored procedures for providing data to the controls. Also, we have several `*.aspx` that use `<asp:PlaceHolder />` for displaying each of the controls that inherit from System.Web.UI. The question comes when, for creating a simple `<select>` dropdown list to display a list of providers, I see that I have to do the following steps:   1. Create a class `cProvider` inside the App_Code, that ultimately inherits from System.Web.UI, with a method that calls to the following DAOProvider object.   2. Crate an specific DAO object to connect to the DB I need to.   3. Create another DAO object, called DAOProvider, that inherits from the previous one, with the call to an stored procedure that retrieves the list of the providers.   4. Create that stored procedure in the database.   5. Create an `.ascx` control to display the `<select>` with the options obtained from `cProvider`. If you're still there, here goes my question: Is this the right way to do things? Is this _high_ level of modularity the correct way to develop mantainable .NET applications? Do I have to follow this style and organization or should I take another one (please give me your recommendations)? From my point of view, having to do all those steps to paint a simple dropdown list doesn't follow KISS principles at all, and becomes unmantainable if somebody else has to take this project, knowing that the code is the only documentation we have. EDIT: links to documentation regarding this topic would be highly appreciated.


title: Where do you turn for code base improvement on a multi-project scale?

text: Are there resources out there for a programmer with a large code base to have professional alalysis performed for the goal of finding the areas of most needed improvement? Logic/Reason tells me there's a limit to what a code review question can absorb, and also that the amount of work involved is not something that should need be free.


title: Approaches to manage related binary files, apart from code

text: I'm working on a website for a photographer, the whole code is just a few files, and whole repository is a few MBs without the actual photographs. But, when I add the actual photographs to git and commit, then the repository jumps to 75 MBs. Considering the photos will be updated, the size of the repository is going to grow big as photos gets updated. I know I'm doing something very wrong. Please, share your methods, for managing big binary files separate from source code, and still maintain dependencies. PS: I don't use a db currently, all are plain text files.


title: Large Ecommerce Site Topology and Deployment Guidelines

text: ## Problem I am a lead engineer for a highly trafficked eCommerce website (upwards of 1m page views an hour). For various reasons we have the opportunity to rebuild large portions of our infrastructure. This brings up a number of interesting problems in balancing flexibility, stability, speed to market, etc... **At a high level I am interested in how others have handled similar situations. In particular I am want to know how others have architected their site to provide stable deploys in fast moving environment.**   * One of the main trade offs I am looking at is breaking our site by functional area and providing them each their own sub domain. The primary driver for this is that we are hosting on Azure and deployments are all or nothing.   * I am also interested in how others have maintained architectural integrity in a fast moving environment and team composed of varying levels of experience. ## Tech We are primarily a Microsoft shop: SQL Server, Windows Server 2008, .Net 4.0, Visual Studio 10, etc... We have also made the decision to host our main site on the Azure platform and are making heavy use of table and blob storage as well as app fabric cache. We are considering using multiple Azure data centers but have not made that final decision as of yet. All static content including JavaScript and CSS will be minified and hosted on our CDN . Our site is built using .Net MVC 3 and is supported by a DDD style architecure. Our data access libraries and business rules are fairly well encapsulated and separate from actual display logic. ## Process While not a true agile shop we iterate very quickly with frequent deployments, multivariate testing, just in time requirements, etc... We are generally very entrepreneurial and have the need to respond quickly to new opportunities as they arise. (code for "it can get chaotic") ## Team Our development team is made up of a couple dozen developers with varying levels of skill and experience. While some of the developers can operate independently others need to have very careful code reviews done. The QA team has a very thorough manual review process. They are also beginning to build a suite of QTP tests to automate regression testing. The dev team in turn makes use of Unit Testing and BDD testing when appropriate. ## Not Considerations I know there are a lot of strong opinions out there so to preempt religious wars here are a couple of responses that will not be helpful to me.   * Just use Java, Oracle, PHP, Ruby, etc...   * Just use EC2   * Just ask your developers to be more careful   * Just tell your developers to code faster   * Just tell "the business" to slow down   * Just use Google Checkout ## Who I'm looking for feedback from I know there are many engineers who, while very skilled, have never worked on systems that supports more than a few hundred concurrent users. The lessons learned from a site supporting 30,000 concurrent users are very different from those of an internal support app (I've worked on both, btw, and am not disparaging internal apps. They just require a different approach). If you have experience in similar situation I would love to hear how you approached the problem and what the draw backs of your solution where.


title: Alternate string formatting options in C++?

text: I'm looking at optimizing some string formatting code that's hit a lot in our code. We had been using ostringstream, and I converted the code to use sprintf (actually Microsoft's more secure sprintf_s). I've traded type safety for run- time performance. But I've debugged enough sprintf related weird crashes to know that sprintf has its own serious flaws that the compile time checking of ostringstream catch. But ostringstream is more than an order-of-magnitude slower then sprintf by my measure, and that's not tolerable in this code. I'm also not thrilled with the readability of C++ stream string formatting, but this may be entirely subjective. So unfortunately when formatting strings in C++ I've got several "standard" options that are suboptimal:   1. sprintf -- fast, but not type safe. Can have insidious bugs when the wrong format string is not used.   2. ostringstream -- slow, but type safe. IMO Ugly, too verbose, and difficult to read.   3. boost::format -- a little more readable then ostringstream IMO, but in my performance benchmarks appears to be even _slower_ then ostringstream, so this is out. To summarize, I'm not really satisfied with the "standard" options. I'd like something that takes both performance and type safety seriously. What other string formatting options are out there for C++?


title: Career Switch from testing to Development

text: I have few questions regarding the switching from testing to development. 1) Do you think the QA exp wont be counted? 2) Does switching from mnc to startup company for skills development will affect a resume? 3) Does a small profile project looks bad on resume,after 2 years of experience. 4) What does a manager looks in a candidate's profile? previous Company? previous project? or skills he/she has developed? 5) Does a software development in a non-it company counted? Please reply your views.


title: How do you annotate code changes and code authorship

text: What is the best way to annotate who authored a file and subsequent changes that were made? I'm a contractor on a new project, one that's just starting, which is using Subversion. The other day I noticed a team member had updated a script written by an outside consultant, and he updated the header from "Written by X" to "Writen by Y and X" (since he had made a decent number of updates). I didn't think this was a good idea, because others after us may update that script with small or large changes and it'd be unclear when to update the "Written by" header (or how to order the names). I pitched the way I had done it at my previous company (with an edit log at the top of each file - which was enforced by whoever verified the changes, we were using Clear Case so changes wouldn't be pushed up until they were verified), but then he mentioned we could just use the "svn log" command to see edits and it'd be hard to enforce an edit log. So now I'm not so sure what the best way to annotate authorship and changes is. Files can completely change over time, so I don't like the idea of a stale "Written by" header. And a "Written by" header that just includes a long list of people with no context doesn't seem useful. There's removing the authorship header, and simply using the subversion change log, but then what do you do about "Written by" headers from code that's given to you (from consultants, old code bases, downloaded from the net, etc)? How do other teams handle this?


title: What is the best way to structure an Android application?

text: I am starting a new Android application. What is the best structure to use? I am planning to make it a multi-package design as follows:   1. Main package, including the Activity   2. Service and data layer   3. Entity package, including entity class. Any advice ?


title: Alternatives for comparing data from different databases

text: I have two huge tables on separate databases. One of them has the information of all the SMS that passed through the company's servers while the other one has the information of the actual billing of those SMS. My job is to compare samples of both of these tables (for example, the records between 1 and 2 pm) to see if there are any differences: SMS that were sent but not charged to the user for whatever reason that may be happening. The columns I will be using to compare are the remitent's phone number and the exact date the SMS was sent. An issue here is that dates usually are the same on both sides, but in many cases differ by 1 or 2 seconds. I have, so far, two alternatives to do this:   1. (PL/SQL) Create two tables where i'm going to temporarily store all the records of that 1hour sample. One for each of the main tables. Then, for each distinct phone number, select the time of every SMS sent from that phone from both my temporary tables and start comparing one by one using cursors. In this case, the procedure would be ran on the server where one of the sources is so the contents of the other one would be looked up using a dblink.   2. (sqlplus + c++) Instead of storing the 1hour samples in new tables, output the query to a text file. I will have two text files, one for each source. Then, open the first file and load all of it's content on a hash_map (key-value) using c++, where the key will be the phone number and the value a list of times of SMS sent from that phone. Finally, open the second file, grab each line (in this format: numberX timeX), look for numberX's entry on the hash_map (wich will be a list of times) and then check if timeX is on that list. If it isn't, save it somewhere to finally store it on a "uncharged" table (this would also be the final step on case 1) My main concern is efficiency. These samples have about 2 million records on each source, so just grabbing one record on one side and looking it up on the other would not be possible. That's the reason I wanted to use hash_maps Which do you think is a better option?


title: How often do you use DI container in your ASP.NET MVC application

text: While reading a book, I came across DI(dependency Injector) and the subsequent DI Container tool. Previously, I developed an application following a tutorial on asp.net website which never used such tool. So, my question can be summed- up in following two concerns :-   * **How often do you use DI Container ?**   * **What requirements make you do so ?** EDIT : Examples with and without DI Container. I have written the codes to understand which is better approach. _**Without** DI Container_ \--               LinqValueCalculator lc = new LinqValueCalculator();     ShoppingCart sc = new ShoppingCart(lc);     decimal total = sc.CalculateStockValue();     Console.WriteLine("Total: {0:c}", total);      _**With** DI Container_ \-- (Ninject is used in this example)               IKernel ninjectKernel = new StandardKernel();     ninjectKernel.Bind<IValueCalculator>().To<LinqValueCalculator>();          IValueCalculator calcImpl = ninjectKernel.Get<IValueCalculator>();     ShoppingCart cart = new ShoppingCart(calcImpl);     Console.WriteLine("Total: {0:c}", cart.CalculateStockValue());      I will be honest, I feel that writing first code was easier and seemed natural. But, your views are what counts as i am just learning the MVC.


title: Knowledge base / questionarie / desicion-tree / decision-making platform

text: I am looking for a software platform/programming framework which can do the following:   * INPUT: a user inputs some text   * PROCESS/REFERENCE DATA: the user is then asked to answer a list some questions regarding the INPUT and attribute the answers either to the whole INPUT or to some parts of the INPUT   * OUTPUT: the list of answers attributed to the original INPUT Some clarifications:   * re: REFERENCE DATA: the list of questions should allow for a sub/follow-up question   * re: PROCESS: the answering process should be as flexible as possible (user should be able to skip questions, provide his or her own answers, etc)   * this is NOT meant to be an automatic/machine learning tool - the user (the human) will be classifying the INPUT himself/herself based on the REFERENCE DATA


title: What's the most used programming language in high performance computing? And why?

text: I believe a lot of Fortran is used in HPC, but not sure if that's only for legacy reasons. Features of modern programming languages like garbage collection or run-time polymorphism are not suitable for HPC since speed matters so not sure where C# or Java or C++ come in. Any thoughts?


title: Would these two scenarios be good candidates for a NoSQL database?

text: I've checked a few other threads around the topic and search around, I am wondering if someone can give me a clear direction as to **_why_** should I consider NoSQL and **_which_** one (since there are quite a few of them each with different purposes)   * Why NoSQL over SQL?   * Is MongoDB the right choice in my case?   * Are NoSQL databases going to take the place of relational databases? Is SQL going away? Like many others - I started with relational databases and been working on them ever since, thus when presented with a problem, the first instinct is to always think of _"I can create these tables, with these columns, with this foreign keys"_ , etc My overall goal is **How to get into "NoSQL" mindset**? ie getting away from the inclination of always thinking about tables/columns/FKs (I understand that there are cases where RDBMS is still the better way to go) I am thinking of 2 scenarios for example just to get more concrete direction **Scenario 1** Imagine a database to model building a furniture instructions (think of IKEA instructions) where you would have the object "furniture" which would have a list of "materials" and have a list of "instructions"   * Furniture - would simply have a name that have a list of Materials and Instructions   * Materials - would be a name + quantity, may be we can even have "Material Category" table as well   * Instructions - would simply be an ordered list of texts My first instinct would go the RDBMS way:   * Create a table called "Furniture", "Material" and "Instruction" and the approppriate columns   * Create the appropriate JOIN tables as necessary and FKs The use of this system can include _searching_ based on materials or may be combination of materials. And may be think of extending the data stored to include information on how many people are required to build it? Difficulty level? how much time it would take? Would something like this be a good candidate for a NoSQL database? **Scenario 2** Imagine a database to model a User database with basic information (eg. name, email, phone number, etc), but you also want to have the flexibility of being able to add any custom fields as you wish. Think of different systems consuming this user database, each system will want to have their own custom attribute to be attached to the user My inclination would go the RDBMS way:   * Create a table for "USER" with columns: ID, name, email, phone   * Create a table for "USER_ATTRIBUTE" with columns: ID, USER_ID, attr_name, attr_type, attr_value The USER_ATTRIBUTE will allow that customization and flexibility without having to shut down the system, alter the database and restart it. Would something like this be a good candidate for a NoSQL database?


title: How to REALLY start thinking in terms of objects?

text: I work with a team of developers who all have several years of experience with languages such as C# and Java. Most of them are young enough to have been shown OOP as a standard way to develop software in university and are very comfortable with concepts such as inheritance, abstraction, encapsulation and polymorphism. Yet, many of them, and I have to include myself, still tend to create classes which are meant to be used in a very functional fashion. The resulting software is often several smaller classes which correctly represent business objects which get passed through larger classes which only supply ways to modify and use those objects (functions). Large complex difficult-to-maintain classes named Manager are usually the result of such behaviour. I can see two theoretical reasons why people might write this type of code:   1. It's easy to start thinking of everything in terms of the database   2. Deep down, for me, a computer handling a web request feels more like a functional operation than an object oriented operation when you think about Request Handlers, Threads, Processes, CPU Cores and CPU operations... I want source code which is easy to read and easy to modify. I have seen excellent examples of OO code which meet these objectives. How can I start writing code like this? How I can I really start thinking in an object oriented fashion? How can I share such a mentality with my colleagues?


title: Is the puts function of ruby a method of an object?

text: I'm trying to understand how the `puts` function fits in Ruby's "Everything is an object" stance. Is `puts` is the method of a somehow hidden class/object? Or is it a free- floating method, with no underlying object?


title: Web Service - SOAP

text: My experience with web services is slim and I'm trying to understand this a little bit more. I have done for instance a web service using visual studio. In order to use it, I add a web service reference in my projects and this creates a proxy and the use is pretty simple. Does this use SOAP? I ask this because i will be now facing a web service that i must communicate using SOAP with attachements and i'm trying to understand the concept behind this and the difference to what i have done so far. Will the proxy still be viable or do i need to create the XML by hand and post it to the web service? This concepts still confuse and so any help is appreciated. EDIT: I'm not developing the service, i will be just using it.


title: Can I use all JetBrains software after purchase

text: So I am thinking about buying the Ruby version of the IDEA that JEtBrain is offering. If I buy a personal license for it, does it allow me to also use the license for IntelliJ also so I can develop Java applications too. Or is it required to buy a separate key for each of them? Was not able to find that kind of information on their homepage, so I turned here with my question.


title: Why is filesystem preferred for logs instead of RDBMS?

text: Question should be clear from its title. For example Apache saves its access and error logs in files instead of RDBMS no matter on how large or small scale it is being utilized. For RDMS we just have to write SQL queries and it will do the work while for files we must decide a particular format and then write regex or may be parsers to manipulate them. And those might even fail in particular circumstances if great care was not paid. Yet everyone seems to prefer filesystem for maintaining the logs. I am not biased against any of these methods but I would like to know why it is practiced like this. Is it speed or maintainability or something else?


title: A scrum team for tiny projects

text: I have been wondering if it would be smart to form a single scrum team for several tiny projects. I am aware that it would be very hard to state a single sprint goal, if a team is working on several different projects. On the other hand: Putting projects that usually are assigned to single developers in a common team backlog would (IMHO) benefit by the synergies of a scrum team. I should mention, that the projects does not vary that much from a technical perspective. I am in a consultancy department where we have projects of very different sizes. For some time I have been working on a larger project using Scrum. Lately, the team has been disassembled, and I am left with one-man assignments. The idea came to me because I was getting more and more frustrated about not having my old teammates for sparring, QA and good old fashioned team spirit. I realized that about half of my department is working on one-man assignments. Then it dawned on me, that there might be a way out of the solitude: A Scrum of small projects. I am keen to hear your opinion on the matter: What do you think of the idea?   What are the pitfalls?   What are the limitations? How do i convince management that it is a great idea?


title: Learning the rules of chess

text: A similar question asks whether a computer can learn to play optimally in chess by analyzing thousands of games. If a machine can look at the state of the board for a few games of chess (or a few games of checkers) in the beginning and after each move, can it be programmed to learn the rules of the game? If it can, to what extent (e.g., would it be able to account for castling or promotion) would this work? Which machine learning algorithms would make this possible?


title: What language to use for prototyping and creating quick scripts?

text: Right now, I use Python for my quick scripts and prototypes (e.g. algorithms, my pseudocode is very Python-like as well). The oher languages that I am familiar with include Java, C, x86 Assembly and Scheme, and Python is pretty much the best for this among these in my opinion. Perl gets a lot of rep for this over and over again, and I have heard that Ruby isn't bad either, and the Python community praises Python for this too. What language (could be another one than these 3) do you think is the best programming language for:   * Creating quick prototypes of applications or algorithms   * Creating simple scripts for small, repetitive tasks Important features for such languages include:   * Little boilerplate code, not too verbose   * (Very) high-level   * Interpreted   * Good and comprehensive standard library


title: Modelling a resource that may not be part of the parent resource

text: I am designing an API and am having a couple of problems with certain parts of the resource modelling. I have the notion of a `SurveyItem` which as a collective form a `Survey`:               Survey Resource Endpoint:     http://api.somewhere.com/survey          Accessing Survey Items     http://api.somewhere.com/survey/1/surveyitems      Pretty basic and i am not overly concerned with the above. `SurveyItems` cannot exist outside the context of a survey hence the hierarchy. Where i am struggling a little is the next level down. A `SurveyItem` is not necessarily one thing (bear with me) as it is based on an interface which is implemented but you may have something like a "Simple Survey" that lets you take notes, a "Video Survey" will let you take a survey via video etc, so they are all the all part of the base implementation but could potentially have different sub resources.               Image and note survey type sample endpoints     http://api.somewhere.com/survey/1/surveyitems/1/images     http://api.somewhere.com/survey/1/surveyitems/1/notes          Video Survey     http://api.somewhere.com/survey/1/surveyitems/2/videos     http://api.somewhere.com/survey/1/surveyitems/2/notes      As you can see above a `SurveyItem` may have different sub endpoints depending on the type of SurveyItem it is. I was thinking of modelling it the way above but using a HATEOAS approach of responding with a collection URLs of the available sub endpoints for each individual survey type so they are discover- able by clients. Is this a reasonable thing to do or are there better approaches to handling things like this?


title: Erlang return value conventions

text: Should functions that return tuples, always return tuples? For example, I have a function `is_user_name_allowed` that returns a tuple in this he form if the username is not allowed: `{false, ["Reason 1","Reason 2"]}` If the I want to return true, is there any convention/benefit to returning a tuple as opposed to simply returning `true`? (`{true}` vs `true`)


title: Estimation of space is required to store 275305224 of 5x5 MagicSquares?

text: Here are some examples of 5x5 Magic Squares found by the Magic Square Generator by Marcel Roos:               Magic squares 5x5     Sum must be: 65          Solution:             1       1  2 13 24 25       3 23 17  6 16      20 21 11  8  5      22  4 14 18  7      19 15 10  9 12          Solution:             2       1  2 13 24 25       3 23 16  8 15      21 19 10  6  9      22  4 14 20  5      18 17 12  7 11          Solution:             3       1  2 13 24 25       3 23 19  4 16      21 15 10 12  7      22  8  9 20  6      18 17 14  5 11           ...      The number of all possible solutions is 275305224. Since calculation of all solutions takes a very long time, I would like have one person with a high speed computer find all solutions (in a long continues span of time) and then share them on the web for other people. What would be an efficient way to store these solutions, using some sort of compression? **(simple logical trick)by attention to the principle that the sum in all rows and columns and diagonal are equal to 65** **we only need to know the value for only 14 cells of 25 cells as shown below , this cause the storage space almost reduce to half 14/25** legend: **+** means stored value and **x** means skipped value !               + + + + x     + + + + x      + + + + x     x + x + x     x x x x x


title: Limitations of the Identity Map pattern

text: After asking about the implementation in Ruby of the Identity Map pattern because the potential memory leak in long running server apps, I am considering my initial concept of that pattern. Initially I thought it was intended to cache database results AND guarantee that **only one instance of the same object exist in memory**. Is this last assumption right? Within DDD there is the tendency where Entity equality is based on having the same **id** not the same memory address, that fits perfectly with the memory problem, however after using many ORMs I always had the "feeling" of having a **unique instance** of my objects. Is this assumption a _dangerous idea_? Should I normally be concerned about my objects having multiple instances? Or even being out of sync with the database?


title: How do you explain Separation of Concerns to others?

text: If you had a colleague who didn't understand the benefits of Separation of Concerns, or didn't understand it quite enough to apply consistently in their daily work, how would you explain it to them?


title: How do I improve my coding skills?

text: Here's a bit information about me, before starting with the question. I am a Computer Science Undergraduate, Java being my primary coding language. The basic problem in my University are the teaching standards. No one is concerned about teaching coding knowledge to students, rather than just theoretical knowledge. The effect being, most of my fellow college mates don't understand programming at all. Even I haven't been able to come out of the traditional programming environment, which limits my coding to an extent. What are the possible ways by which I can develop and expand my programming/coding skills. Also, can you suggest the sources for the same? **Edited** : Sources suggesting development of coding skills.


> **Possible Duplicate:**   >  How do I improve my coding skills? I was asked this ( _What is the best way to stay on the cutting edge of Software Engineering?_ ), and it's really bothered me that I didn't have a good answer. There are really two parts to this question:   1. Where is a good place (websites - magazines) to go to learn about emerging technologies, frameworks, design principles, etc?    2. How can I get a good feel on which emerging technologies will be adopted by "the industry?"  I realize the second will be harder than the first since no one has a crystal ball, but any advice would be welcomed.


title: Continuous Professional development – the best approach

text: From my experience in the current working environment, one's professional development is definitely in the hands of the individual. As I see it there are several routes to the same objective based on cost, time and availability   1. External Offsite training Online   2. Training providers (itunes U,Pluralsight etc)    3. Books    4. Specialist /user groups    5. Specialist web sites (Channel9, stackoverflow,dnrtv,codeplex etc) What would you consider to be the best approach (blend) to continued learning and maintaining a professional standard of work?


title: how to write good programming logic?

text: recently I got job as a java developer, and now I have assigned project too. I want to know what is a good logic? when I check in the code my team lead is saying that its a good code. But when it comes to my project manager he is saying that its a bad code. And he is changing my code, after his changes if I see his code its really very very good and even simple. can you please tell me how to develop the good program, good logic? what is the best way to structure a problem in terms of code?


title: Logical reasoning skill tests

text: I'm job hunting so I decided to sharpen a bit of my skills. I've been working on implementing solutions to some of the "Project Euler" problems, but I would like to work on stuff which is not specific to programming. Does anyone have good resources with tests that be used to test logical reasoning skills, creativity and those kinds of things? I know some people question their value as a predictor of developer hability, but there are some HR departments which use those kinds of tests, so I wana get some preparation done. Thanks.


title: How I do become a better programmer as a junior developer

text: I am a junior developer in South Africa. I just graduated from college last year. My current employers hired me as a developer but they do not give me anything to develop and I've been working here for 8 months now. How I do become a better developer? How do I grow? I do some development at home, but how can I get more exposure? I have looked for another job, but that's not the point. I do not want to give up, I want to become a better developer. How can I improve my skills?


title: Increasing confidence in personal knowledge about coding

text: > **Possible Duplicate:**   >  I'm graduating with a Computer Science degree but I don't feel like I know > how to program I have been a .net dev for about 3 years at a non-software company, and I want to try and implement unit testing into our software projects. I have been reading blogs about the basics of unit testing and am currently reading The Art of Unit Testing. I feel I have a fairly good understanding of how unit tests can be set up and implemented, but I am wary of implementing it because if things were set up wrong, no one would notice / my team would be writing bad tests thinking they were good tests. I feel that my whole underlying issue is with fear of failure, being in implementing unit testing or in persuading the team to start using / writing unit tests. How do/did you increase your confidence in your own knowledge about coding?


title: How to Deliberately Practice Software Engineering?

text: I just finished reading this recent article. It's a very interesting read, and it makes some great points. The point that specifically jumped out at me was this: > The difference was in how they spent this [equal] time. The elite players > were spending almost three times more hours than the average players on > deliberate practice — the uncomfortable, methodical work of stretching your > ability. This article (if you care not to read it) is discussing violin players. Of course, being a software engineer, my mind turned towards software ability. Granted, there are some very naturally talented individuals out there, but time and time again, it is those folks who stretch their abilities through deliberate practice that really become exceptional at their craft. My question is - how would one go about practicing the "scales" of software engineering and computer science? When I practice the piano, I will spend more of my time on scales and less on a fun song. How can I do the same in developing software? To head off early answers, I don't feel that "work on an open source project," and similar answers, is really right. Sure...that _can_ improve your skills, but you could just as easily get stuck focusing on something that is unimportant to your craft as a whole. It can become the equivalent of learning "Twinkle Twinkle Little Star" and never being able to play Chopin. So, again, I ask - how would you suggest that someone deliberately practice software engineering?


title: What do you do to improve your logical programming skills?

text: Do you think that only the programming pratice will help you to improve your logical programming skill or do you train your brain with puzzle games, trying imagine how universe works, playing instruments and so on? Devoting more time with programming, will do you get logical programming skills more fast?


title: I'm graduating with a Computer Science degree but I don't feel like I know how to program

text: I'm graduating with a Computer Science degree but I see websites like Stack Overflow and search engines like Google and don't know where I'd even begin to write something like that. During one summer I did have the opportunity to work as a iPhone developer, but I felt like I was mostly gluing together libraries that other people had written with little understanding of the mechanics happening beneath the hood. I'm trying to improve my knowledge by studying algorithms, but it is a long and painful process. I find algorithms difficult and at the rate I am learning a decade will have passed before I will master the material in the book. Given my current situation, I've spent a month looking for work but my skills (C, Python, Objective-C) are relatively shallow and are not so desirable in the local market, where C#, Java, and web development are much higher in demand. That is not to say that C and Python opportunities do not exist but they tend to demand 3+ years of experience I do not have. My GPA is OK (3.0) but it's not high enough to apply to the large companies like IBM or return for graduate studies. Basically I'm graduating with a Computer Science degree but I don't feel like I've learned how to program. I thought that joining a company and programming full-time would give me a chance to develop my skills and learn from those more experienced than myself, but I'm struggling to find work and am starting to get really frustrated. I am going to cast my net wider and look beyond the city I've grown up in, but what have other people in similar situation tried to do? I've worked hard but don't have the confidence to go out on my own and write my own app. (That is, become an indie developer in the iPhone app market.) If nothing turns up I will need to consider upgrading and learning more popular skills or try something marginally related like IT, but given all the effort I've put in that feels like copping out. EDIT: Thank you for all the advice. I think I was premature because of unrealistic expectations but the comments have given me a dose of reality. I will persevere and continue to code. I have a project in mind, although well beyond my current capabilities it will challenge me to hone my craft and prove my worth to myself (and potential employers). Had I known there was a career overflow I would have posted there instead.


title: What are the ways to start making actual/real-world programs using Java/C++ to excel my Programming Skills?

text: > **Possible Duplicate:**   >  How do I improve my coding skills?   >  How I do become a better programmer as a junior developer The programming that we learn at university is not that vast, like those are really small exercises to build our logic, but everyone knows that this will not be the scenario when I'll get out in the market as a professional programmer, I really want to make real life programs which would actual make some impacts and will be useful. Tell me in the light of your experience that how should I start making those programs and polish my self as a professional programmer, if there are any sources available for it then kindly also recommend me those.


title: Improving logic/creativeness as a programmer

text: I am currently working as a software developer and am getting by ok, but feel that there is something missing from my skillset. Looking at job interview questions and processes of some of the big tech companies there is definitely an emphasis on problem solving and creativeness when tackling software problems. Some of the examples I would not have any chance at all solving. How can these skills be improved/learned? Or is this is simply a natural thing that cant be learned?


title: Thinking skills to be a good programmer

text: I have been programming for last 15 years with non-CS degree. Main reason I got into programming was that I liked to learn new things and apply them to my work. And I was able to find and fix programming errors and their causes faster than others. But I never find myself a a guru or an expert, maybe due to my non-CS major. And when I saw great programmers, I observed they are very good, much better than me of course, at solving problems. One skill I found good in my mid-career is thinking of requirements and tasks in a reverse order and in abstract. In that way, I can see what is really required for me to do without detail and can quickly find parts of solution that already exist. So I wonder if there are other thinking skills to be a good programmer. I've followed Q&As below and actually read some of books recommended there. But I couldn't really pickup good methods directly applicable for my programming work. What non-programming books should a programmer read to help develop programming/thinking skills? Skills and habits to develop to be good at programming (I'm a newbie)


title: Stepping between learning about programming and actually programming a small project (C#)

text: I'm a Games Design Student, aware of the frequent advice that I should be good at something else as well (Programming/Art) so I'm useful when a designer is not required and also for the sake of being more useful - generally as a wish to increase my employability, value in group projects and make me capable of individual projects (which would require Design AND programming AND Art all stemming from what I can produce). As such I wish to complete some minor C# projects. In particular, I wish to write a simple Pong clone over this weekend before term starts up again on Monday. The problem is, when ever I try to write a program, unless it's blindly following instructions (which is simply parroting) I am unable to establish a workflow that moves me forward. If I have an idea or mechanic I wish to document I have some templates I refer to and fill out. If I wanted to produce an art asset I'd consider what asset is (a car, a person) the graphical style (pixel art or drawing or 3d), the technical constraints (resolution/file formats). For a programming workflow I'm under the impression I have my pseudo-code of what I want to make, I go through each item and check a scripting reference to see how I make each step and break them down further as required. However I have, say, "Draw Paddle_1, Move Paddle1 up/down in relation to input,..." and I cannot progress. I've been given modules in different languages over the past two years (which I've passed all of - since it just involves parroting instructions) however I am at a loss for picking something to do, how to do it then doing it. How do I make this leap between loose knowledge of programming and knowing basics of structure and the vocabulary towards actually being able to write something (short of copy/pasting bodies of code from googling them - after doing that dozens of times I only end up frustrated and angry and walk away from programming for months, until it comes up again)?


title: How to improve yourself and grow as a programmer?

text: > **Possible Duplicate:**   >  How do I improve my coding skills? I'm a 4 yrs experienced programmer with JAVA being the strong point of mine. I know basics of web, C++ android, blackberry programming. Was wondering how should I improve myself. Does learning new languages help or learning design stuff and learn to become a architect? How do you guys plan yourself for future? May be learn a language every year? or be in touch the the new technologies? How do you guys improve yourself as a core programmer?


title: Where to go from here, how to improve / learn more

text: > **Possible Duplicate:**   >  I'm graduating with a Computer Science degree but I don't feel like I know > how to program I finished University around 4 years ago double degree in Software Eng/Comp Sci. Got my first job at a startup in my final year, was with them for 2.5 years then started my own business. So far everything is going great, lots of clients and stead work etc, but coming right out of uni and into a start up I never had any form or senior software engineer guiding my work or suggesting improvements etc... Whats the best way for me to improve & learn more? Books? MS Exams? Other? I develop in C#, ASP.NET/MVC. **Update** The problem isn't really with releasing products, I've released quite a few which are up and running with customers happy. It's more with quality of code, best practices, how do I know something I am code is correct, it may work but there may be ways of coding it much more efficiently or by adhering to some kind of standard Cheers for any responses! Matt


title: How do I create my own programming language and a compiler for it

text: I am thorough with programming and have come across languages including BASIC, FORTRAN, COBOL, LISP, LOGO, Java, C++, C, MATLAB, Mathematica, Python, Ruby, Perl, JavaScript, Assembly and so on. I can't understand how people create programming languages and devise compilers for it. I also couldn't understand how people create OS like Windows, Mac, UNIX, DOS and so on. The other thing that is mysterious to me is how people create libraries like OpenGL, OpenCL, OpenCV, Cocoa, MFC and so on. The last thing I am unable to figure out is how scientists devise an assembly language and an assembler for a microprocessor. I would really like to learn all of these stuff and I am 15 years old. I always wanted to be a computer scientist someone like Babbage, Turing, Shannon, or Dennis Ritchie. * * * I have already read Aho's Compiler Design and Tanenbaum's OS concepts book and they all only discuss concepts and code in a high level. They don't go into the details and nuances and how to devise a compiler or operating system. I want a concrete understanding so that I can create one myself and not just an understanding of what a thread, semaphore, process, or parsing is. I asked my brother about all this. He is a SB student in EECS at MIT and hasn't got a clue of how to actually create all these stuff in the real world. All he knows is just an understanding of Compiler Design and OS concepts like the ones that you guys have mentioned (i.e. like Thread, Synchronization, Concurrency, memory management, Lexical Analysis, Intermediate code generation and so on)


title: I want to create a new language

text: > **Possible Duplicate:**   >  How do I create my own programming language and a compiler for it I want to create a new general purpose language that will compile to JavaScript and I'd like to be able to write it in that same JavaScript. I wouldn't go much into detail about why, but how can I do it? Currently I have professionally coded in JS, Java, Groovy, PL/SQL, PHP among the rest, so I'm covered on the language user side of the story, but I have no theoretical or practical knowledge from the create language side. I have browsed the web for the past week and noticed a soup of acronyms and/or names like RR, LALR, BNF, AST etc. so I figure I need two things:   * Good Book(s) about theory   * Working projects or experiments that I can use to jump start my learning (something free like that narcissus) EDIT: No, this question does not cover the EXACTLY SAME content and it is not on the same topic even worse, even though there are two good answers, they don't answer how I can practically USE JS TO BUILD THE TOOLS (JS TRANSPILER) I NEED FOR THE NEW LANGUAGE. Any ideas?


title: Should the creation of an object implicitly or explicitly create a file?

text: I'm creating an object whose sole purpose is to read in a file of one format and create another of a different format. Is it best to create the output file implicitly during object initialization or to have a public method that gives the user the choice when this file will be created?


title: Invert how to teach programming?

text: I was thinking about the responses to my thread on programming Program like a writer..? and most people agreed that you should have some structure and build from there instead of just typing away. New programmers, however, tend to just type, find mistakes, add code, and repeat unti it works. To quote Richard Pattis: > “When debugging, novices insert corrective code; experts remove defective > code.” This is fine and all, but the problem is that people **repeat their mistakes**. After making a mistake enough times, they eventually learn to avoid it. To give a practical example, consider `warning: control reaches end of non- void function`. Most new programmers will see this, google it, figure out what's wrong, add in `return 0;`, and they're good to go. They don't care about the error; they just want the solution What if we invert this concept? Why not teach them how to mess up first? A possible assignment could be: > Consider the warning "control reaches end of non-void function" What causes > this warning to occur? Provide code to demonstrate all the ways this warning > can appear. Evaluate the following code samples and explain why the warning > appears. This way, the programmer learns that all non-void functions need to return something. They would have to write code to create this error (debugging/testing), and evaluate existing code to find the error (code review). I'm not saying we teach this _before_ fundamentals, because you should understand iteration/recursion, loops, assignment, equality, etc before writing significant code. I'm saying that instead of solving errors as rookies make them, why not concentrate this knowledge in the beginning. What do you guys think of this idea? What are the shortcomings of this approach, and can it be feasibly implemented anywhere?


title: php make dollar optional

text: Is there any reason the PHP language could not be updated in a future version to make the $ prefix on variable names optional? Reasons that would break existing code? I'm thinking it would still be required for string interpolation, like "Hello $name", but most of the time it would be optional. For example,               $name = 'Bob';     echo "Hello $name";      would still be valid, but so would               name = 'Bob';     echo "Hello $name";


title: Is it a good practice to create a ClassCollection of another Class?

text: Lets says I have a `Car`class:               public class Car     {         public string Engine { get; set; }         public string Seat { get; set; }         public string Tires { get; set; }     }      Lets say we're making a system about a parking lot, I'm going to use a lot of the `Car` class, so we make a `CarCollection` class, it may has a few aditionals methods like `FindCarByModel`:               public class CarCollection     {         public List<Car> Cars { get; set; }              public Car FindCarByModel(string model)         {             // code here             return new Car();         }     }      If I'm making a class `ParkingLot`, what's the best practice? **Option #1:**               public class ParkingLot     {         public List<Car> Cars { get; set; }         //some other properties     }      **Option #2:**               public class ParkingLot     {         public CarCollection Cars { get; set; }         //some other properties     }      Is it even a good practice to create a `ClassCollection` of another `Class`?


title: How to account for a bug fixing iteration?

text: We have implemented Scrum quite successfully for the past 5 months. Though, we are 3 weeks away from PROD without _ever_ doing any end-to-end integration test. OUCH! I need help. Without tackling the causes of this (at THIS point), we need now to plan the current iteration, which consists of minor improvements and MANY still unknown bug fixes. How do you account for this scenario? How do you plan your iteration to fix bugs yet to be found?


title: Which technologies to create web interface for scientific instrument?

text: I am working on software for some scientific instrumentation. An embedded computer running Windows 7 is inside the instrument, which controls various components of the device; cameras, motors, thermometers, etc. I've written a basic interface in WPF/C# and use remote desktop to test the application. (Reason is safety, the instrument will be used in high radiation areas). What I want: A server runs on the embedded PC. The user accesses a web page at 192.168.x.x (Internet access would be nice, but not necessary) and clicks 'collect data' and the server loads the relevant C# .dll's, acquires data and uploads the data to the user. Speed/scalability is not much of a concern, as data acquisition could take anywhere from minutes to days. What I'm confused about: How do I go about executing my existing C# code from a web application? i.e., which .NET technology(ies) should I look into using?


title: What is the precise definition of programming paradigm?

text: Wikipedia defines **programming paradigm** thus: > a fundamental style of computer programming which is echoed in the descriptive text of the paradigms tag on this site. I find this a disappointing definition. Anyone who knows the words _programming_ and _paradigm_ could do about that well without knowing anything else about it. There are many styles of computer programming at many level of abstraction; within any given programming paradigm, multiple styles are possible. For example, Bob Martin says in _Clean Code_ (13), > Consider this book a description of the _Object Mentor School of Clean > Code_. The techniques and teachings within are the way that _we_ practice > _our_ art. We are willing to claim that if you follow these teachings, you > will enjoy the benefits that we have enjoyed, and you will learn to write > code that is clean and professional. But don't make the mistake of thinking > that we are somehow "right" in any absolute sense. Thus Bob Martin is not claiming to have _the correct_ style of Object-Oriented programming, even though he, if anyone, might have some claim to doing so. But even within his school of programming, we might have different styles of formatting the code (K&R, etc). There are many styles of programming at many levels. So how can we define _programming paradigm_ rigorously, to distinguish it from other categories of programming styles? _Fundamental_ is somewhat helpful, but not specific. How can we define the phrase in a way that will communicate more than the separate meanings of each of the two words--in other words, how can we define it in a way that will provide additional meaning for someone who speaks English but isn't familiar with a variety of paradigms?


title: How does a CS student negotiate in/after a job interview?

text: Alright, I've gotten to the second step in the interview process. At this point I'm working under the assumption that I might be offered a position -- flying my butt to Redmond would be quite an expense if they weren't at least considering me for something (*crosses fingers*). So, if one is offered a position, how should a CS student negotiate? I've heard a few strategies about dealing with software companies when you are being considered for a hire, but most of them are considering the developer in a powerful position. In such examinations, (s)he has lots of job experience, and may even be overqualified for what the employer is looking for. (s)he is part of a small job market of qualified developers, because 99% of applications companies receive are from those who are woefully under qualified. I'm in a completely different position. I think I compare favorably to most of my fellow students, and I have been a programmer for almost 10 years, but often I still feel green compared to most of my coworkers. I'm in a position where the employer holds most of the chips; they'd be doing me quite a favor by hiring me. I think this scenario is considerably different than the targets for most of the advice I've seen. Above all, I don't want to be such a prick negotiating that it damages my chances to actually operate in a position, even if it means not negotiating at all. How should one approach a scenario like this? * * * P.S. If this is off topic feel free to close it -- I think it's borderline and I'm of the opinion that it's better to ask and be closed than not ask at all ;)


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

text: > **Possible Duplicate:**   >  What are the key differences between software engineers and programmers?   >  What is the difference between software engineer and software developer? What's the difference in this terminology? Is one considered more professional than the other? ### Related Questions   * When someone asks you what you do, what do you say (e.g. programmer, developer, code monkey)?   * What is the difference between software engineer and software developer?   * What are the key differences between software engineers and programmers?


What are the key differences between software engineers and programmers?


title: How to climb up the hierarchy from a programmer (codesmith) to a full-fledged Software Engineer?

text: > **Possible Duplicate:**   >  What is the difference between software engineer and software developer?   >  How to move from Programmer to Project Lead Writing code all your life is not really very practical in terms of growth or is it? I have heard professionals of the industry emphasizing upon focusing on UML and System Analysis & Design methodology to new and experienced programmers to grow further and excel to become a Software Engineer. Communication skills also play a vital role to manage teams and projects. Seeking for some good advice here besides learning UML and SAD.


title: How to move from Programmer to Project Lead

text: At my job, I'm currently a programmer, but in the next few weeks I'll be taking control my own project. I was wondering if anyone else here has been in the same situation, and if so, what advice you can offer to help me be able to better run my project. Experience in dealing with contractors would be greatly appreciated. A little more info:   * Project will have 3 people including myself, with extra people coming in when needing testing.   * The project has been programmed mainly by 2 people   * I would like to contribute to the programming as I like doing it and think I can add to the program, but am afraid of how the contractors will react. I don't want to create bad feelings which may harm the project. EDIT: Forgot to mention that I'll have to be picking up communications with customers to make sure their needs are met. Any advice on talking to customers cold would be greatly appreciated. EDIT 2: This is not a new project, I'm picking it up around version 6. Sorry that I didn't make it clear before.


title: What is the actual difference between Computer Programmers and Software Engineers? Is this description accurate?

text: According to the Bureau of Labor Statistics, this is the difference: > Computer programmers write programs. After computer software engineers and > systems analysts design software programs, the programmer converts that > design into a logical series of instructions that the computer can follow They predict employment to increase for software engineers by 34% but to decline for programmers. Is there actually any such real distinction between the 2 jobs? How can one get a job designing programs (to be implemented by others)?


title: Software Engineer and IT Professionals

text: If you graduated as an Information Technology or a Computer Science student and you have a job that involves computer programming such as developing websites and systems, can you be called Software Engineer?


title: Why software engineering = programming?

text: I live in South America, and here the translation for "Software Engineering" is a knowledge for the SWEBOK (Software Engineering Body of Knowledge) subjects, such as: Requirements, Development methods (Waterfall, Spiral, SCRUM, etc..), Tests, Quality, Maintenance, etc.. **Why do English materials such as classes, articles, and even stackoverflow questions about Software Engineering just address (basically) programming?** Example: http://stackoverflow.com/questions/131571/recommended-books-for- software-engineering Most of recommended books in the answers above are basically programming, and the Software Engineering 'bibles' that have SWEBOK items written by Pressman and Summerville are almost unnoticed. Actually, most of SWEBOK items doesn't have focus in the programming code. Secondary Question: What is the English name for the profession/subject that really needs to know all SWEBOK subjects? (not only 'good programming').


title: How should I describe myself on my CV? As a software developer? A software engineer? A senior developer?

text: I know this has been asked a lot, but I'd like to know what to present myself as on my CV and to future employees. I'm 24, and began as a C#/ASP.NET developer after graduating from University in 2010 (I studied Computer Science). Since then I have worked for a relatively small software development house (about 8 employees), and since early 2012 I've been essentially the most senior .NET developer (the others in the company have more experience but only in drastically different/outdated languages, and are just learning .NET). My roles there are designing and developing applications. I don't usually write the specs, but the specs are essentially the customers requirements - all the technical details including the design of the database and application are up to me. I also have 3 MCTS certificates and I'm working towards an MCPD. As I've essentially only got around 3 years experience, I'm a bit unsure of how to present myself - clearly I'm not what most would constitute as 'senior'! Would you class me as a software developer, or something more?


title: Computer Science and the IT industry

text: I have a Computer Science degree and I'm employed as a software engineer. I'm regularly approached by recruiters on LinkedIn with "programmer", "software developer", or general "software and/or computer industry" propositions. Every now and then though a recruiter will approach me with an "IT position" opportunity. I understand that in the absolute general sense anything and everything between the keywords _computer_ and _software_ will at some point include IT, but when it comes to more specific discussions, particularly offers for an interview for an "IT position", I often find that to be a bit odd. It often strikes me as if I am being offered to interview for the position of a DBA, sys admin, or an IT staff manager, positions that are as foreign to me as the medical field. To avoid subjectivity, I'll make my question simple. Is a _software engineer_ , _coder_ , _programmer_ or a _software developer_ , in an IT position? IT industry (app development, scientific, multimedia/game)?


title: Does what I'm doing make me a software engineer?

text: > **Possible Duplicate:**   >  What are the key differences between software engineers and programmers? I am a software company owner for 8 years now. After years of operation I figured out that all the while what I was doing was a software engineer's job. There are several questions in my mind that I want to ask from you guys. I know that answers will be subjective. As a software engineer, do you really need to be a seasoned programmer? Is it true that software engineers don't code but just make diagrams, functional specs. and othe related documents? I also noticed that there are no SE standards or board exams to pass and its really a dynamic and situational job. So basically I can just proclaim myself as a software engineer based on experience and product?


title: Are there any implementations of deterministic regular expressions?

text: The question itself is already in the title, so here I will just provide additional details. I call a regular expression "deterministic", if, after converting the regular expression into a nondeterministic finite automaton in the obvious way, the result is already a deterministic finite automaton, without performing an explicit nondeterminism removal procedure. For example:   * **Deterministic:** `ab(cb)*`   * **Nondeterministic:** `a(bc)*b` I never use nondeterministic regular expressions. In particular, this means that matching my regular expressions never requires backtracking. I want a regular expression implementation that is explicitly designed to handle deterministic regular expressions, and takes advantage of them in order to match character streams that must be read sequentially, such as C++'s `std::istream`s. My preferred languages are Haskell, Standard ML, Rust and C++11, although I am open to suggestions for any statically typed languages.


title: How long should a sprint planning meeting last?

text: In your experience, how long should a planning meeting (SCRUM) last? 8 hours? Or should it be shorter (succinct) and further discussions should be planned as part of the sprint (10 days sprint)?


title: Will high reputation in Stack Overflow help to get a good job?

text: In a post, Joel Spolsky mentioned that 5 digit Stack Overflow reputation can help you to earn a job paying $100k+. How much of that is real? Would anyone like to share their success in getting a high paid job by virtue of their reputations on Stack Exchange sites? I read somewhere that, a person got an interview offer from Google because a recruiter found his Stack Overflow reputation to be impressive. Anyone else with similar stories?


title: Does having a high "rep" on StackOverflow help you get a job? What other community sites do?

text: > **Possible Duplicate:**   >  Will high reputation in Stack Overflow help to get a good job? Just curious, what Web2.0 websites do employers use (if any) to pre-screen potential employees? Does any employer actually refer to a user's online "reputation" to get a job?


title: Will high reputation on Programmers help to get a good job?

text: > **Possible Duplicate:**   >  Will high reputation in Stack Overflow help to get a good job? In reference to this question, do you think that having a high reputation on this site will help to get a good job? Aside silly and humorous questions, on Programmers we can see a lot of high quality theory questions. I think that, _if_ Stack Overflow will eventually evolve in "strictly programming related" (which usually is "strictly _coding_ related"), the questions on Programmers will be much more interesting and meaningful ("Stack Overflow" = "I have this specific coding/implementation issue"; "Programmers" = "Best practices, team shaping, paradigms, CS theory"). So could high reputation on this site help (or at least be a good reference)? And then, more o less than Stack Overflow?


title: What do you wish you had been taught in uni before moving to industry?

text: Is there something that you wish you could have learnt, as part of a course or something, in uni, now that you've been in industry for a while? Maybe something such as "I wish there was a course in time estimation" or "I wish I had learnt how to work in large projects", and so on.