How to learn to become a web developer?

> **Possible Duplicate:**   >  What should a developer know before building a public web site? I have been working in telecommunication companies for more than 3 years, and now I want to try to become a web developer. I use C++ for a long time, and it is my most familiar language, and the platform is Unix or Linux. Because of my programming skills, I tried to apply several positions like C/C++ software engineers which I think require this kind of knowledge. But I failed for all the positions. A majority of the positions I applied really need was C language skills other than C++. And all need strong knowledge about the data structure and algorithm which is a filed that I am not good at. After several trials, I realized that there was a problem. What I am good at is at something like C++, Object Orientated design, and the analysis ability, which is a little high level thing. But the positions I applied require C, algorithm which were a little low level. So is there some positions in web which are suitable for my programming skills? or How many things I need to learn to become a web developer based my programming skills? Thanks.


Introductory to Web programming but with Experience

> **Possible Duplicate:**   >  What should every programmer know about web development? I'm not sure where to start with web development. I have experience with HTML and PHP fundamentals and have tried out a little CSS. As of yet, I haven't tried Javascript. Should I focus on one of these or something else?


What is the best way to remember Java APIs?

I have been doing Java for nearly a year now and I have difficulty remembering Java APIs and method names. What is the best way to remember them?


What concepts/technologies should an ASP.NET developer be familiar with

I am in the process of filing in the gaps in my knowledge so that I can become a better developer. I am an ASP.NET developer and I sometimes need to do pure back-end stuff too. I ahve compiled a list of things I deem as necessary to know. Please feel free to fill in any gaps:   1. WebForms   2. MVC   3. jQuery   4. HTML5   5. WPF   6. WCF   7. The Repository pattern   8. Dependency injection (Castle.Windsor)   9. NHibernate   10. Entity Framework   11. Asynchronous programming   12. SQL. As in: hardcore SQL with temp tables and groupings and variables and stuff.   13. Unit Tests


how do you remember programming related stuff?

How do you remember programming related stuff? Have you had the feeling that you've encountered the error you have before you right now, a few years ago and you could swear you knew the cause then but now you've forgotten it? Did you work with the xsl's string parsing some time ago but now you can't remember exactly which are the string functions altogether from xsl and you have to start from scratch? Or perhaps you forget about some feature from Apache Commons like "filtering a collection by some predicate" that you surely used in the past. So how do you do it? I tried having a blog but when I develop apps, I never find the time to update the blog or write about my experiences. Also, using a wiki is a nice thing but then I found it difficult to keep a clean separation between them since many times I needed to change a blog post to add new information about that topic. This made me think that I actually should have put this topic in the wiki instead of the blog. Do you have any systems that help you remember about your programming experience? What's your setup?


a few newbie questions about web app development

1. I have a hosting package with Just Host that I use for my Wordpress blogs. Is this the same as having a “web server” when referencing web app development? I live-chatted with tech support and they said is has apache installed and I can configure mysql and python. I'm planning on programming my app in python. Do I need something else from another service?   2. Do I need to setup a “developer environment” on my mac just to build my MVP?. I’ve read that I need to download MAMP and this will give me apache and a virtual server, is that true? I’ve download, MAMP and python. My web app will require a database but I’m not sure what to download for that.   3. Is anyone willing to review my idea and give me a sense as to what I need to do and if it would be obtainable or realistic that I could do it myself? My exposure to the tech community is limited (html/css) but I know i can compelete my goals with a few helping hands.  Its learned that people don't know your starving unless you ask for a plate.. so ladies and gents can someone please feed me?


Where to master HTML, CSS and Javascript?

> **Possible Duplicate:**   >  What should a developer know before building a public web site? I gotten interested in web-development lately. I am still a student. I learnt basics of HTML, CSS and JavaScript. Then I thought I should improve my server side scripting. So I am learning Struts2 and I am doing better there. Now I have decided I should finally put my skill to some use. So my friend and I have decided to come up with a fun website for our class. But now I am realizing that, though I know server-side scripting to a good extent (not great, just good considering I am a beginner), I am nowhere near good in the basic elements viz. HTML, CSS and JavaScript. I mean, I can't do cool stuff with it. I am aware of w3schools, but it would be great if you can point out a more intuitive place where I can learn to do all the cool stuff in a short time. Some of the problems I am facing are: 1) How should I design the basic layout of my website? 2) How can I use 3rd party APIs like that of Facebook graph?


Web Developer or Web Designer

> **Possible Duplicate:**   >  What should every programmer know about web development? I have built 10+ straightforward websites using the Symfony framework and Wordpress. Does this mean I am a web developer or a web designer? I set the sites up in Symfony and wrote the CSS/Javascript/HTML. I had to write themes for Wordpress and move some code about. What experience do I need to to be a web developer and not a designer? What experience distinguishes me from a designer that knows HTML and jQuery?


What should a web designer know?

> **Possible Duplicate:**   >  What should every programmer know about web development? I want to be a web designer. I've spent the past few years on ASP.Net MVC. Where should I focus to learn web design? When I think it's only about HTML, CSS, JavaScript - it's not. Can someone tell me how I can take it practically. I already have been writing HTML for the past several past years but not practically (it's not well-design or look better). I feel there is a big chapter in web-design. Can someone explain me how I can start learning then in future if someone give me a works I can do them in better way.


How to become an expert web-developer?

> **Possible Duplicate:**   >  What should every programmer know about web development? I am currently a Junior PHP developer and I really LOVE it, I love internet from first time I got into it, I always loved smartly-created websites, always was wondering how it all works, always admired websites with good design and rich functionality, and finally I am creating web-sites on my own and it feels really great.   My goals are to become expert web-developer (aiming for creating websites for **small and medium business** , not **enterprise-sized** systems), to have a great full-time job, to do freelance and to create my own startup in future. **General question:** What do I do to be an expert, professional and demanded web-programmer? **More concrete questions:**   1). **_How do I choose languages and technologies needed?_** I know that every web-developer must know HTML+CSS+JS+AJAX+JQuery, I am doing some design aswell cause I like it and I need it for freelance also. But what about backend languages? Currently I picked PHP cause it's most demanded in my area and most of web uses it, but what would happen in future? Say, in 3 years, I am good at PHP and PHP frameworks by than, but what if some other languages get most popular? Do I switch to them? I know that good programmer is not about languages and frameworks but about ability to learn and to aim the goals, but still I think that learning frameworks for some language can take quite some time. Am I wrong? 2). **_In general, what are basic guidelines to be expert web-developer?_** What are most important things I should focus on? Thank you!


What is a good generalization of web development architecture?

I'm new to web development. From looking at popular open-source frameworks for both front-end and back-end, I have a general idea of what the modern full- stack web setup looks like: Database <-> Back-end language ~ REST API <-> Front-end Notes:   * The back-end language (Python, Ruby, PHP, Java) generates the API, which is the only layer between the back and the front. The API has authentication to protect private data.   * The front-end sends GET and POST requests to the API. A MVC framework can be used, such as Backbone, Angular, or Ember.js. Is my understanding accurate?


Document Database versus Relational Database : how to choose?

I'm a SQL guy, but I know there is _Not Only SQL_ databases - document- database mostly. As with most technologies there are pro and cons for each technology. I've read some articles, but they were too theorical. What I would like is two real cases :   1. when a switch from relational- to document-database gave an improvement    2. when a switch from document- to relational-database gave an improvement Improvement being any thing that makes better programs - less developpement time, scalabilty, performance, anything that is programming related. There is a caveat for 2. : stories like " falling back to relational database because everybody knows SQL" is not good


Reverse engineering airline reservations systems

I saw an interesting conversation on here about airline reservation systems and the services that connect them (like Sabre). This is an almost identical analog to a problem I've been trying to figure out and I'm looking for the fundamental components required to build a service like Sabre (no this isn't a competing service but something that functions remarkably similar). So the elements of building a Sabre would be: Access to the individual databases (through API I'm assuming) A portal through which a search is entered The question(s): Does it matter if the databases are compatible with one another (i.e. all on oracle etc.)? Just how big a project is this? It seems relatively straightforward to someone who's not a database programmer, but I totally know that's naiive. If my company were working to build a service like this (again, not for airline seats but the mechanism is very similar) what would first steps be? To save everyone the snarky retorts, I understand that this is over my head personally, I'm trying to figure out what resources I'd need to get folks who could do it. No, I don't think I can teach myself, I know I need to hire crazy smart folks to do it. This is an attempt to understand the elements I need to put in place to get a start on this. I genuinely appreciate any help folks can give. PS - two links that describe the essential functions relatively well:   Airline Reservation System   and   Computer Reservations System


Would it be possible to create an open source software library, entirely developed and moderated by an open community?

Call it democratic software development, or open source on steroids if you will. I'm not just talking about the possibility of providing a patch which can be approved by the library owner. Think more along the lines of how Stack Exchange works. Anyone can post code, and through community moderation it is cleaned up and eventually valid code ends up in the final library. For complex libraries an elaborate system should probably be created, but for a simple library it is my belief this is already possible e.g. within the Stack Exchange platform. **Example** Take a library of extension methods for .NET for example. Everybody goes their own way and implements their own subset of what they feel is important, open- source library or not. People want to share their code, but there is no suitable platform for it. extensionmethod.net is the result of answering this call for extension methods, but the framework hopelessly falls short; there is no order, or structure at all. You don't know whether an idea is any good until you try it, so I decided to create an Extension Methods proposal on Area51. I belief with proper moderation, it could be possible for the site to be more than a Q&A site, and that an actual library (or subsets of it) could be extracted from it. Feel free to give feedback to this particular idea on it's proposal page on area51, but it is just meant to be an example. This question is meant to find an answer to the general idea of creating an open source software library moderated by an open community. **Questions**   1. Is it possible? What would be the main problems to such an approach?   2. Has anything like this been attempted before?   3. Are there platforms better suited for this?


How to write constructors which might fail to properly instantiate an object

Sometimes you need to write a constructor which can fail. For instance, say I want to instantiate an object with a file path, something like               obj = new Object("/home/user/foo_file")      As long as the path points to an appropriate file everything's fine. But if the string is not a valid path things should break. But how? You could:   1. throw an exception   2. return null object (if your programming language allows constructors to return values)   3. return a valid object but with a flag indicating that its path wasn't set properly (ugh)   4. others? I assume that the "best practices" of various programming languages would implement this differently. For instance I think ObjC prefers (2). But (2) would be impossible to implement in C++ where constructors must have void as a return type. In that case I take it that (1) is used. In your programming language of choice can you show how you'd handle this problem and explain why?


Options for client-side encryption of local web databases

My scenario is as follows:   * Web application, run from the browser, designed for mobile devices.   * Uses WebSQL storage which may contain sensitive data.   * Uses Application Cache to enable offline use where there is no connectivity.   * Can connect to an API where even more sensitive data can be downloaded. Authentication is handled with BASIC Authentication, and unencrypted data is transferred over the wire, as the application shall access the API in the following environments/scenarios:     * On a private, secured, local Wi-Fi network.     * Over the public internet, over a VPN connection.     * Over the public internet, through a HTTPS connection. So far, based on my limited knowledge, the security of sensitive data transferred over the wire is covered. However, the data 'at-rest' in the local WebSQL storage, and formatted in the HTML pages of the web application, is not secure. The current concern is if a mobile device contains sensitive data, and it is lost or stolen, how to minimise the risk of the sensitive data being accessed. As the application needs to be usable without interaction with the server, any software-based encryption would be contained on the client itself. This means that, presumably, attempting to encrypt the WebSQL database will be pointless as if a skilled intruder can bypass the hardware encryption, they can presumably determine the encryption/decryption logic as well? The proposed solution for encryption of data at rest, is to use the built-in hardware encryption that is part of iOS and Android devices, requiring users to enter a password at the lock screen. There are related 'remote wipe' features as well that could be used. **Q: How 'secure' is the proposed solution? If the built-in hardware encryption is not enough, what are the best strategies for implementing client-side encryption of WebSQL data without need of interaction with a server?** Is the implementation of a software-based, data encryption/decryption solution, only going to give a marginal security benefit, as the encryption/decryption code can be accessed and reverse engineered? Is it just me, or is the main benefit of that merely marketing purposes, i.e. being able to 'say' that it is encrypted? Interesting links: http://security.stackexchange.com/questions/10529/are-there-actually-any- advantages-to-android-full-disk-encryption Also... > Underlying storage mechanisms may vary from one user agent to the next. In > other words, any authentication your application requires can be bypassed by > a user with local privileges to the machine on which the data is stored. > Therefore, it's recommended not to store any sensitive information in local > storage. > > https://www.owasp.org/index.php/HTML5_Security_Cheat_Sheet#Client- > side_databases Does this mean the only secure option is to produce a hybrid application? E.g. using Phonegap. Is this a great deal more secure, could it just be reverse engineered to view the JavaScript that encrypts/decrypts in the same way anyway?


Arrays' subscripts priority

I was reading a lecture on arrays for Fortran 90 and I came across this sentence : 'Fortran always stores by columns - the first subscript varies more rapidly than the second, and so on.' What does the author mean to say ?


Dependency Inversion Principle: Understanding how both low level components and high level components depend on abstractions

I'm learning about the Dependency Inversion Principle. It states that: > High level modules should not depend upon low-level modules. Both should > depend upon abstractions. For a while I tried to understand what it means that both the high level components and the low level components, rely on the abstractions and are _dependent on them_. _I'm assuming both should depend on the **same abstraction** in some way. Please correct me if this is wrong._ I have come to some conclusion about what this means. Please confirm if this is accurate. ![enter image description here](http://i.stack.imgur.com/p3IRQ.png) " **The high level components** are dependent on the abstraction" - Meaning: The high level components **talk to an interface to communicate with the low level components** , instead of communicating with concrete low level components directly. The low level components implement this interface. " **The low level components** are dependent on the abstraction" - Meaning: The low level components are **defined and designed in the terms of the interface.** They are designed to **fit the interface**. They are dependent on the interface, in the way that **the interface defines how they are designed.** (Often low level classes implement that interface). This way, both the high level components and the low level ones are 'dependent on the abstraction', but in different ways. Is this a good understanding?


Can the author of code licensed under CC-NC-ND use it in commercial closed-source software?

I am working on project on which I need to open-source part of my code in order to simplify extension by the enduser. What I want, is to make an npm module, that will expose part of my code, so my users can build extensions for the product (in JavaScript), but I want a guarantee that this code will not be used for commercial or other development work, beside extensions for my product. I found **Creative Commons Attribution NonCommercial NoDerivs** license to be a fit. **My problem:** Can **I** , as the author of this code, use it in a commercial closed-source application? **Disclaimer:** I know this is kind of a legal question, but please, state what you think, no one is holding you accountable/liable for it. Thanks.


Do you use Cobertura in the enterprise?

Cobertura is a reporting tool for code-coverage of unit tests. The license for Cobertura is complicated: Ant tasks are covered under Apache 1.1 (easy enough), but instrumented bytecode involves the GPL. Details are here: http://cobertura.sourceforge.net/license.html In a classic CYA, the conclusion of the license states "it depends on your interpretation of the license". How have you interpreted the license? Do you use Cobertura in developing commercial software for the enterprise? i.e. simply using it to report on your JUnit tests. I'm **not** asking about bundling Cobertura with your product.


How does one make a cluster capable program?

In cluster computing, there seems to be two options: task redirection and task splitting. Task redirection seems easy enough, you just have the master dispatch the small calls to other nodes in the cluster for processing (eg webserver clusters (I think)). Task splitting however seems wildly more complex. Since I don't think you can have two threads of the same program run on different machines, meaning you have to split up the work. How though does one split up the work? I can see some stuff like rendering or video encoding just because you can tell each node to work on a different part of the video, but when you want to do things like calculate the 5 trillionth digit of pie, how would you split that up? Or even in science where you need to simulate weather or other resource intensive tasks? In short, how do you split up tasks that aren't really designed for splitting up?


Is having candidates play Portal a good interviewing tactic?

I read a blog that said something along the lines of: > Some candidates could be inexperienced but with potential to be great. A > good way to test this is to have them solve (non-programming) puzzles to > test their problem solving skills. I wonder if solving the puzzles in the game Portal could be a good way to do this. First of all, its fun, candidates would enjoy the interview and be more enthusiastic about the job. However, many programmers are familiar with this game, and it would only work if they have never played it before. Also, my first time playing it I didn't find it very difficult, but I also love solving puzzles. So maybe its not difficult enough to really test problem solving skills. If this is a bad example, what are some good examples (of problems to solve)?


where to allocate the room for new enviroment variable?

in unix, i want to modify enviroment variables.   if size of new value is larger than the old one, the room for the new variable is allocated by malloc.   however, is memory for enviroment variables above the stack? (not heap memory) where to allocate the room for new variable?


What is the best way to create and guide an enterprise architecture?

Wikipedia defines Enterprise Architecture as follows: > An enterprise architecture (EA) is a rigorous description of the structure > of an enterprise, its decomposition into subsystems, the relationships > between the subsystems, the relationships with the external environment, the > terminology to use, and the guiding principles for the design and evolution > of an enterprise. This description is comprehensive, including enterprise > goals, business functions, business process, roles, organisational > structures, business information, software applications and computer > systems. Practitioners of EA call themselves "enterprise architects." > > An enterprise architect is a person responsible for developing the > enterprise architecture and is often called upon to draw conclusions from > it. By producing an enterprise architecture, architects are providing a tool > for identifying opportunities to improve the enterprise, in a manner that > more effectively and efficiently pursues its purpose. As a company grows, the enterprise architecture has a tendency to fracture (if it existed at all) and become a big ball of mud. Unfortunately at that point, any individual development group within a company is usually not structured or positioned properly to create an enterprise architecture, and there is usually little incentive for any particular group to do so since they are focused on their business problems. On the flip side, creating a separate "architecture group" that is not closely aligned with the business priorities and delivers from on high what architecture should be isn't sufficient either since the work they do usually falls on death ears by those people doing the "real work." What then is the best way to create and guide an enterprise architecture?


Will any js libraries be updating api's with html5 under the hood?

So there is a lot of cool stuff in the html5/css3 specs which should be able to replace a lot of the stuff that have been traditionally done with javascript. Does anyone know if any of the major js libraries (jquery, mootools, extjs, etc) or any newer js libraries are going to be implementing their libraries in such a way that an html5 implementation will be used; but defaults to existing implementation (html4/pre-CSS3/js) when older browsers (IE8/FF3.5 and earlier) are used for backwards compatibility? Basically, I'm trying to find out if there is a trend in this direction; or if this is kind of a reset point where completely new libraries are being written as opposed to mashups.


Have you ever written anything that made you a lot more efficient (or want to)?

Sometimes we want to be more efficient and productive, what have you written to reach this?


Open Source Project to learn about systems engineering

I am a an engineering student and I want to learn more about systems programming . I wanted to know the various open source projects that I have as options to learn from about the same. The Linux Kernel Project is very stable and has a very large code base.I wanted to know about projects that would not take much time to get boot strapped and start contributing. Thanks


Managing expectations

I am in my senior year of college. I am an intern at a $120 million a year company. I am responsible for maintaining three websites, I'm essentially the dba for the marketing database, and write and support in-house software. I'm booked pretty solid. My issue is that the upper management likes to severely over commit me in about every possible way. For example, the VP of the company told one of our larger customers that we had a cross ref mobile app ready to show them at the meeting a week away. I had not even started such a thing, nor had I ever written a mobile app in my life. It was a fairly simple project, but I still had to kill myself to get something delivered in that time frame on top of my regular responsibilities. It's a double edged sword, if I did not get the app delivered, it would have looked bad on me. However, getting it done gets the VP thinking "well if that's what you can do in a week..." The upper management has no idea of the work that goes into IT projects. They seem to think it is magic. I've complained about my situation to a few people and all I ever hear is "Welcome to _name of our company_ " I would just leave, but it's a great job in many ways in a growing company. Not a bad place to be when I'm about to graduate. Anyways, my question is: As an intern (low man on the totem pole) how do I get the management to understand what goes into my workday and what is reasonable to accomplish? How do I get them to not commit me to projects with out discussing it with me? I don't know what to say or how to say it to put it into perspective for them without sounding like I am whining or incapable. Make sense?


When Business Object fields should not exactly reflect database columns

Main advantage with Hibernate annotations is the fact that a simple POJO (also called a Business Object the most of time) can become persistent through Hibernate annotations (or actually JPA) . In the scenario where our conceptual domain model (business objects used by clients) does not exactly reflect the physical model (database), how to deal with? Should I create a "second" model that represents the "true" business objects used by clients AND a "data storage object" containing mapping Hibernate annotations? Of course, with this solution, DAOs will be responsible to convert each BO to Data Object and vice-versa.


Common practice for abandonware in SVN

I have a general repository for small utilities (which were deemed too small at the time to warrant their own repository. 'Nother problem of itself maybe), some of which are deprecated and likely to never serve again. But one rule where I work is to never throw anything away. Deleting from SVN means it's not really deleted, it's just in the history somewhere, but that can still be hazardous in case you need to find that old thing again. What would be the best strategy for keeping deprecated items, but also keeping them out of the way?


migrating product and team from startup race to quality development

> **Possible Duplicate:**   >  A simple ways to improve the release quality in RAD environment This is year 3 and product is selling good enough. Now we need to enforce good software development practices. The goal is to monitor incoming bug reports and reduce them, allow never ending features and get ready for scaling 10x. The phrases "test-driven-development" and "continuous-integration" are not even understood by the team cause they were all in the first 2 year product race. Tech team size is 5. The question is   1. how to sell/convince team and management about TDD/unit testing/coding standards/documentation - with economics.   2. train the team to do more than just feature coding and start writing test units along - which looks like more work, means needs more time!   3. how to plan for creating units for all backlog production code


Free Offline download of MSDN?

I was doing some searches for MSDN documentation and see it's online for free. It appears now they have a way to download it from the web, but I wasn't able to find out exactly how to do so. For the offline content, do you have to have Visual Studio installed and if so, will the express version work for this? Or can you download and run the MSDN help files standalone?


How to safely run random binary codes?

Okay, so I am looking for a way to safely run a randomly generated binary code. I also need to be able to decompile the code. Any ideas and all programming languages are welcome. BTW it most be binary code; byte code or source code will not work. This is a research project, so I can't go adding variables.


Finding an object on an infinite line

Question: There is an infinite line. You are standing at a particular point you can either move 1 step forward or 1 step backward. You have to search for an object in that infinite line. Your object can be in any direction. Give an optimal solution My approach:                      Go 1 step forward, 2 step back ward             Go 2 step forward, 4 step back ward and so on       Complexity: Lets say the required object is at point n. Total number of steps:                3 + 6 + 9 + .... n      = 3(1 + 2 + 3 ... n)      = O(n^2)      Is there a way to improve the efficiency?


What are some version control systems based on different concepts than Git, Mercurial etc?

Most of the version control systems I have used have a lot of similar functionallity for source code files: they work on their text content, diff using well known diff algorithms, the changes contain deleted and inserted lines of text, the whole workflow is based on some form of commits, branches and merging of branches. Several days ago I found and I started playing with Darcs, a version control system created by the Haskell community based on Patch theory. I wonder if there are any other, more esoteric version control systems based on different concepts(e.g. different kind of commits, working on code structure, etc)


Simple method to authenticate human input into a form for relaying via email to a 3rd party

I put up a webpage advertising a particular birthday party. A simple html page served by apache2 on ubuntu server 12.04. I have a link on the page to a cgi script-Python-that asks the requester to submit text values that will be formatted and relayed in an email to the bithrday boy. What's a simple way to authenticate that a human being is filling out the form, so that I can avoid having the birthday boy receiving spam. Using standard CGI because I do not expect an overload of concurrent requests. I am aware of things like reCaptcha, but am looking for canonical strategies for quick and dirty authentication. Not being paid for this and the site will be up for but 9 days, so I don't want to put time into a solution more robust that what I actually need. Would asking a human answerable question suffice? If so could I get a away with a dropdown box of selectable answers. I want quick and dirty, but I also don't want to wind up with boat loads of spam because I underestimated the intelligence of spam bots.


Best pratice for return json in a REST application?

I'm starting now with REST (using Laravel 4.2) and Mobile (Android, iOS, SP, etc.) applications. Initially I'm checking if the request is ajax/json and then return a json response. But this condition is in a normal action (HTTP), so: **if ajax/json** return json, **else** return the view/template/layout Is it correct to do that in the same action, or is the best practice to create another controller for that? For example:   * PostsController   * PostsMobileController Or   * PostsController   * Mobile\PostsController (or Json\Controller) - _using namespaces_


Is it 'safe' to expect myClasses to agree not to only call package Scope methods from other Package scope methods?

The questions says it all, but a quick overview of the situation. I'm creating a Model which contains classes (all inherriting myObject) which have a large amount of interconnection. I want the controller to be able to create any of these objects any time, without modifying the Model. Only an explicit cal to the model to "AddToModel" would 'install' the object into the model (including updating all the connected objects). myObjects will use a factory pattern, if a user tries to create something already represented in the Model the already- instanced object in the model will be returned instead of constructing a new one. To help with encapsulation I want all of my Objects to be effectivly-immutable to the controller, no matter what he does with an object he can't change the Model without calling the Model's add/remove. The model still has to be able to change myObject state; so I would put all of the objects into the Model package. Each object will then have package scope methods for updating state, including add/remove methods which install them in the model and update connected objects. So essentially Package scope methods can change model state, public can't. My concern is that this will all break if any of myObjects calls one of their package scope methods from a public method; messing with my state without explcit calls to Model. I am writing this all, so I can abide by the contract that "only package methdos can call other package methods" But what if someone comes by later and tries to call "addToModel" from a constructor because they didn't read my comments and don't realize this breaks an assumed contract? Is it 'safe' to expect others to read comments and abide by such an implicit contract when messing with 'my' model? Can I enforce this with some sort of pattern (preferable without too much abstraction/interfaces as it could confuse some of the other developers). ps, I'm using Java if that helps. I think I might even be able to enforce this with the security API, though that may just prove more confusing/complicated since it would result in an obscure runtime exception.


Writing a desktop application for progammer from PHP background

I have a client who wants a tool for him to be able to upload his products, enter orders, and keep track of customer details. There are quite a few highly customised requests, which is why he wants the tool custum made. He does not care much about the interface design - it just has to be usable and provide access to the databade. I've already designed the database. I have no experience of desktop applications and usually write my web apps in PHP with the Yii framework. But hosting this on a server seems like overkill. I also have .net experience from a few years ago. What would be the best options for writing this as a desktop application?


Would a typical corporate firewall block a Java applet having the following behaviour

I'm thinking of developing a proxy-like program to forward ports on a remote PC to a local PC (for example SSH). Assume that both local and remote PCs are running behind typical firewalls (i.e. consumer broadband router firewall, Windows firewall or corporate firewalls). The program will be a Java program which the user will run on both the remote and local PC. The remote client will periodically poll a central server to determine whether there are pending client connections. A session could be initiated as follows:   1. The local client contacts the central server and request the current connection details for a specific remote client.   2. The central server responds with the remote server's last received IP address and port.   3. The next time the remote server polls the central server, the client's IP address and port are returned. The remote server initiates a connection to the local client using the IP address and port returned by the central server and listens for a response on a random port. The remote server will pass the value of the port it's listening on to central server.   4. Goto 1, if client fails to connect to server. All coomunication with the central server will be via HTTP/HTTPS on ports 80 & 443. Would this work or will a typical firewall block the interactions.


What is a normal "functional lines of code" to "test lines of code" ratio?

I'm pretty new to TDD approach and my first experiments say that writing 1 line of functional code means writing about 2-3 lines of testing code. So, in case I'm going to write 1000 LOC, the whole codebase including tests is going to be something like ~3500 LOC. Is this considered normal? What is the ratio in code you write?


Unit Testing: How much more code?

I'm fairly new to unit testing. In school it's always been, "hey it works, onward!" But I've started to write professionally, and even at work that's been basically the mantra. However, I've started to see the validity of unit testing and TDD. I've come to a realization, that when I write maybe a 20 line piece of code, I'll usually write a 100-250 lines of code testing those lines of code. Is this about average? Are there better best practices of unit testing that I'm not aware of? Any way, I thought it was an interesting observation and was wondering, on average how much more code do you write when you write your unit tests?


Why do we have to use break in switch

Who decided, and basing on what concepts, that `switch` construction (in many languages) has to be, like it is? Why do we have to use `break` in each statement? Why do we have to write something like this:               switch(a)     {         case 1:             result = 'one';             break;         case 2:             result = 'two';             break;         default:             result = 'not determined';             break;     }      I've noticed this construction in PHP and JS, but there are probably many other languages that uses it. If `switch` is an alternative of `if`, why we can't use the same construction for `switch`, as for `if`? I.e.:               switch(a)     {         case 1:         {             result = 'one';         }         case 2:         {             result = 'two';         }         default:         {             result = 'not determined';         }     }      It is said, that `break` prevents execution of a blocks following current one. But, does someone really run into situation, where there was any need for execution of current block and following ones? I didn't. For me, `break` is always there. In every block. In every code.


Doctoral research and work for a company with similar profile

What are the common guidelines and best practices for developers who are studying for their master or doctoral degrees, while still working to earn the living in a commercial entity. Especially, if profile of the commercial entity is partially similar to the research topic. The reason for this question is because:   * Master/doctoral students have to publish their findings, therefore releasing information to public domain   * Commercial entities usually have clauses that all work items assigned to their employees, electronically, in spoken, and in written, are actually copyrighted, and the employee is transferring all ownership to a commercial entity   * Most commercial research is considered trade secrets and not to be released to a public domain, NDA, etc. So, for example, if you are employed for a company that simulates turbine parameters using server clusters, while your research topic is, for example, "Physics simulation frameworks". The thing suddenly becomes muddy. Yet, at the same time, seems that thousands of people work and publish their findings in conferences while working in the same exact field. What's the catch? How can you keep doing your research work while maintaining rights to your exact research field, and a copyright to implement the proof of concept/prototype/product after graduating if you later decide so. Seems that a lot of people do somehow.


Project frozen - what should I leave to the people after me?

So the project I've been working on is now going to be frozen indefinitely. It is possible that if and when the project unfreezes again, it won't be assigned to me or anybody from the current team. Actually, we inherited the project after it had been frozen before, but there was nothing left by the prior team to help us understand even the basic needs of the project, so we wasted a lot of time getting to know the project well. My question is what do you think we should do to help the people after us to best understand the needs of the project, what we have done, why we've done it, etc. I am open to other ideas of why should we leave some tracks to the others that will work on this project also. Some steps we already have taken:   * technical documentation (not full but at least there is some);   * source-control system history;   * estimations on which parts of the project need improvement and why we think so;   * bunch of unit tests.   * issue tracker with all the tickets we've done ( **EDIT** ) What do you think of what we've already prepared and what else can we do?


What's a good model for continuous manager <-> programmer feedback?

Is it important for managers to give devs regular feedback on how they're doing and vice versa? I say vice versa because I consider employees to be responsible to their manager, and managers to be responsible to their employees. Everyone seems to think this is a good idea but in practice I rarely see it happen because so many shops are "agile" now and that usually means a daily standup plus a weekly kickoff, etc. So one-on-ones just don't happen. In my last position I had my first one-on-one w/ my manager 6 months after I'd been w/ the company. It turned out there was lots of misunderstanding, misalignment and confusion built up and snowballed. Not really surprising when there's no direct personal communication for that long.


Why learn Flash Builder 4 (Flex) when I can just use Flash Professional?

I want to learn Flash Builder 4 (Flex) because I see so many jobs requesting experience with it. I also just like knowing stuff. I am also very interested in focusing on RIA development now. BUT... can anyone tell me CLEARLY why the heck I would ever use FLEX over Flash Pro? It is a time investment, so is it worth it? All I read are misguided posts about how Flash Pro is for games and banner ads, and Flex is for programmers and RIAs blah blah... this simply isn't so from my 9 years of contracting experience. I'm 99.9% certain that I can build anything a flex developer can build, but using Flash Pro. I can build powerful AS3-driven apps for the desktop, mobile device, or browser, and I can link to databases with XML and I can import text files and communicate with ColdFusion and everything. The advantage with Flash Pro is that I can also easily and clearly animate transitions and build custom elements that look the way I want/need them to look for my specific client. Why would I want to use a bunch of pre-built components that drive my file sizes to the moon? Who is happy with a drag-n-drop button? Is Flex just a thing made for programmer people with no artistic inclination? What is the advantage of using it? It takes me back to Visual Basic class. Seems like a pain to have to use multiple tools to import crap from Flash Pro into Flex and yada yada... why when I can do it all nicely in Flash Pro to begin with. Am I clueless, or missing some major piece of the puzzle? Thanks for any clarity. PS, I couldn't care less about the code editors. It ain't that bad people. They make it out like the thing doesn't even respond to keyboard input or something. Does everything I need it do anyways. Please help out here. If I just don't need to learn it, I don't want to waste the time.


What tools are available for remote communication when working from home or with a distributed team?

My supervisor is allowing my team to dip our toes in the water of working from home. Considering a recent aquisition of another company is requiring some employees to love this new idea which will hack up to an hour off their commute into work every morning, I really want this to succeed. In order to make it a success, we need good tools to make our lives a lot easier. We currently are set up with OpenVPN, and Team Foundation Server 2010 with SharePoint 2010, and use Live Messenger (for SharePoint integration and easier remote desktop) for IM. These are just what we use (and they are currently working well) , but you can suggest other products. So, what are some great tools that will helps us collaborate, communicate, and generally work together when we're hours apart?


Do you Know of Any Audio Podcasts Discussing PHP Standard PHP Library (SPL). I'd like to listen to this in the bath.


What UML diagram should I use to show a platform's architecture?

I have been learning UML and have a basic understanding now, but I keep seeing these sort of high level architecture diagrams. Here's one from Microsoft: ![enter image description here](http://i.stack.imgur.com/nQw2n.jpg) Source: A bad picture is worth a thousand long discussions. Is this a UML diagram? Are there any rules to follow for creating these types of diagrams? I would like to represent something similar, i.e. the realtionship between different installed systems / APIs... i.e. Platform architecture.


What aspects should I be wary of when choosing a web development framework?

I am a relatively new to the world of software development and I've used the Ruby on Rails framework to develop relatively simple applications before. I know that frameworks can be extremely useful in terms of getting applications up and running quite quickly. However I also know about the well documented problems that Rails had in terms scalability, and I was wondering if there were any other factors that I should be wary of before deciding to use a web frameworks in general aside from scalability, particularly when designing non-trivial business applications.


What is the convention for skipping lines in programming?

I was wondering what is the convention for skipping lines? Do we group similar things together, skip no lines or just group everything together except if statements or similar constructs. If there is no convention for this, then tell me how you do it and at the end ill determine if i want to use any. Currently i skip no lines. Languages - C, C++, C#, PHP and Java


Can CSS be considered a DSL?

According to Wikipedia, CSS is a style sheet language. However, it's pretty much the only such type of language in use (at least from a web developer's perspective). When trying to categorize CSS as a language or technology (e.g. for a résumé), would it be acceptable to simply call it a domain-specific language? If you don't think it can, why not?


What is a UNiversal IT Test (UNITT) and how do I prepare for one?

I will be taking an advanced PHP UNiversal IT Test (UNITT) for a position I am applying for. However, I am unfamiliar with the term 'unitt test'. What is a unitt test and how would a company execute one? If anyone is familiar with this, please let me know the best way to prepare


When is an Open Source project ready for production?

When you find a new open source library / project, what criteria do you look at before incorporating it into your source base.   * Are there legal questions you need to answer?   * Do you look for a certain amount of development velocity?   * Is the community buzz a good enough reason?   * Does your decision change if you are the one on the line for the project?   * Does the complexity of the domain or code change your way you think about it?


Should I be involved in my project's business side?

Before my current job, I was always involved in the technical aspects of a project like:   * architecture   * design   * performance   * security   * etc Now I'm team lead of a project that's a game on a web site (not mine) and somehow got involved in the business side of the project:   * what users expect   * ads showing in which pages of the site   * mechanics of the game   * etc But I quite don't agree with business people's (customer or product owner if you like) decisions of the directions of the site. Of course I raise my concerns, some of them are taken into account, most of them aren't. I continue my work as usual as I like working here but I feel like the product would be better than what it is now. I think that's because my goal is to make an interesting and challenging game, and theirs is to attract as many people and earn money as possible (it's a paid game). Have you guys ever happened to be in this kind of situation? What are your experiences?


When does implementing MVVM not make sense

I am a big fan of various patterns and enjoy learning new ones all the time however I think with all the evangelism around popular patterns and anti- patterns sometimes this causes blind adoption. I think most things have individual pros and cons and it's important to educate what the cons are and when it doesn't make sense to make a particular choice. The pros are constantly advocated. "It depends" I think applies most times but the industry does a poor job at communicating what it depends ON. Also many patterns surfaced from inheriting values from previous patterns or have derivatives, which each one brings another set of pros and cons to the table. The sooner we are more aware of the trade off's of decisions we make in software architecture the sooner we make better decisions. This is my first challenge to the community. Even if you are a big fan of said pattern, I challenge you to discover the cons and when you shouldn't use it. Define when MVVM (Model-View-ViewModel) may not make sense in a particular piece of software and based on what reasons. MVVM has a set of pros and cons. Let's try to define them. GO! :)


Organising models in ASP.NET MVC

I'm building websites in ASP.NET MVC and I quickly figured out that my models are getting harder to organise as they grow. What I normally do is create one model to add and edit data. But in my add view I have 2 extra properties. So I'm re-using the same model with 2 extra properties but I don't use these my edit view. Now I have a few questions regarding this. How do you organise it?   * Do you create one file class with multiple models in it or is it better to create a new file for each model?   * Is it better to create a new model if you need a few more properties?


Understanding Application binary interface (ABI)

I am trying to understand the concept of Application binary interface (ABI). From The Linux Kernel Primer: > An ABI is a set of conventions that allows a linker to combine separately > compiled modules into one unit without recompilation, such as calling > conventions, machine interface, and operating-system interface. Among other > things, an ABI defines the binary interface between these units. ... The > benefits of conforming to an ABI are that it allows linking object files > compiled by different compilers. From Wikipedia: > an application binary interface (ABI) describes the low-level interface > between an application (or any type of) program and the operating system or > another application. > > ABIs cover details such as data type, size, and alignment; the calling > convention, which controls how functions' arguments are passed and return > values retrieved; the system call numbers and how an application should make > system calls to the operating system; and in the case of a complete > operating system ABI, the binary format of object files, program libraries > and so on.   1. I was wondering whether ABI depends on both the instruction set and the OS. Are the two all that ABI depends on?   2. What kinds of role does ABI play in different stages of compilation: preprocessing, conversion of code from C to Assembly, conversion of code from Assembly to Machine code, and linking? From the first quote above, it seems to me that ABI is needed for only linking stage, not the other stages. Is it correct?   3. When is ABI needed to be considered?  Is ABI needed to be considered during programming in C, Assembly or other languages? If yes, how are ABI and API different? Or is it only for linker or compiler?   4. Is ABI specified for/in machine code, Assembly language, and/or of C?


When to separate application concerns

I've worked for a number of companies that have, over time, branched out their core service to provide additional services and/or revenue streams. My question is when is the proper time to separate these concerns into multiple applications, even when they're operating on the same/extensions-of-some data? For example, say a company has a core business application that resolves around a music index/music discovery. If this company later decided to branch out into offering websites for musicians that utilize their existing index, should this be a separate application that receives its data from the core- business-application via API, or is it reasonable to lump this into a module of the existing application, and use existing business objects? It seems to me that the **ability** to lump things into one application shouldn't be reason enough to do so. In Unix, we practice Separation of Concerns, but when it comes to enterprise development, this principal seems to be lost. In the example above, I would feel that these _should_ be separate applications, but in my experience I witness developers lump these together to save time.


An Extra-Intellectual search in a large text

Have you ever seen, met, or worked with a smart/intellectual search library/framework/algorithm during your career? I need a very nice mechanism to search among text, I don't need a "Personal Google", just thought that programmers' community have met with such problem and know/can provide a good solution. Is it possible to search by "meaning" and could you advice a way/technique/thoughts according this? Thank you.


When stuck, how quickly should one resort to Stack Overflow?

I'm self-learning iOS development through the iTunes U CS193p course, and I often find myself stuck. I've been trying to get unstuck myself, but it might take me hours and hours to figure out what I'm doing wrong, be it missing a method or not really getting a whole concept like delegation. I'm worried that I might be wasting too much time, and I'd be better off going to Stack Overflow shortly after I get stuck so I can move on. In your experience, does quickly asking on Stack Overflow hamper the learning process or improve it?


Will HTML5/JS Eventually Replace All Client Side Languages?

I'm just wondering about the future of it all. IMHO, there are 4 forces that define where technology goes: Microsoft, Apple, Google, Adobe. It looks like in Apple's iPhone/iPad iADs can now be programmed in HTML5. So does that mean HTML5 will eventually replace objective-c? Also, Microsoft has now shifted it's focus from WPF/Silverlight to HTML5 and I assume Visual Studio 2011 will be all about tooling support for HTML5. Because that's what Microsoft do. (Tools). In a few months IE9 the last major browser will support HTML5. Similarly Adobe is getting on the HTML5 bandwagon and allows to export flash content to HTML5 in their latest tools. And we all know how much in bed Google is with html5. Heck, their latest Operating System (Chrome OS) is nothing but a big fat web browser. Apps for Mobile (i.e., iPhone, Android, WM7) are very hard for a company to program especially for many different devices (each with their own language) so I'm assuming this won't last too long. I.e., HTML5 will be the unifying language. Which is somewhat sad for app developers because now users will be able to play the "cool" html5 apps for free on the web and it'll be hard to charge for them. So are strongly-typed languages really doomed, and in the future, say 5-10 years, will client side programming only be in HTML5? Will all of us become javascript programmers? :) Because the signs are sure pointing that way...


How to figure out real life examples of design patterns?

Hi I am learning design patterns from a book . How to figure out the actual production code where it is implemented . For example , if I am learning strategy pattern , it might be implemented in Spring framework . But how to go and search there and see it . Do you guys have any easy ways of finding such stuff ?


What are QUICK interview questions for the Microsoft stack development jobs?

I'm looking for your best "quick answer" technical interview questions. We are a 100% Microsoft shop and do the majority of our development on the ASP.NET web stack in C# and have a custom SOA framework also written in C#. We use a combination of Web Forms, MVC, Web Services, WCF, Entity Framework, SQL Server, TSQL, jQuery, LINQ, and TFS in a SCRUM environment. We are currently on .NET 3.5 with a very near transition to .NET 4.0. Our interviewing process includes a 55 minute interview with two technical people (usually an architect and a senior developer). The two interviewers have to share the time for questions. That isn't enough time for very many true programming problems so I'm looking for more good questions that have quick, yet meaningful, answers. We are mainly interviewing for Senior Dev positions right now but may interview for some Juniors in the future. Please help? EDITED FOR CLARIFICATION: The should not necessarily be specific to the MS stack. I just don't want questions that are specific to OTHER technology stacks like Ruby or Java.


How do you cope with the dynamic nature of high-level software development?

I consider myself a high level software developer. I enjoy reading a lot, and it's helped me over the course of my career. I think I am doing well. Right now, I spend a lot of time learning new things. I don't suck when it comes to writing code right now, but I'm about to start a family, and I regularly see many seniors with 14-15 years of experience who—because they cut back on learning new things—now suck at programming. They were inspiring figures at some point of time, but they are not anymore. You might argue that basics never change, but it does appear to make a difference when you are coding on Delphi for 10 years and suddenly everyone is using the .NET framework. It's true that an experienced developer will take less time when learning a new framework, but it still **does** demand time and effort. How does a software developer manage the demands of the job while still being able to concentrate on things that necessarily take you out of the job, like starting a family?


What are the major differences when moving from console-based to GUI-based programming?

I started, like many others, with console-based (as in terminal, not Playstation) programming. But sooner or later, one needs to touch upon GUI- based programming, whether you want to or not. This transition holds many changes in how you need to think about the frontend (and possibly also the backend). So, what are the major differences when moving from console-based programming to GUI-based programming?


What makes a successful development team?

What are the signs of a successful development team? What qualities does a team of developers need to possess in order to be successful?


If I finish one project, should I wait until the next day to start another one or begin right away?

There are some days where I feel like I get a lot done. I've finished deploying my most recent project and cleared everything from my TODO list, and still have some time left in my day. I DO have a couple of larger projects I could dive into, but its so hard to when I feel like I've accomplished quite a bit in one morning and know I'll be leaving for the day in a few hours. Its even worse when it's a Friday (like today) In this sort of situation I tend to slack off a bit. Browse SO and answer questions to learn, work on some custom libraries for myself, surf the web for cool and interesting things to learn.... I try to keep it limited to work- related things but I find it really hard to stay focused. My question is, how do I get back on track? Or should I even bother? Is it acceptable to spend the rest of the day learning, or should I just sigh and start wading into another project even knowing that I won't have time to get much done and that I'll have forgotten most of it by Monday?


What makes a good Scrum Master?

How do I identify a good Scrum Master? Here are some possibilities:   1. The person is agile (doesn't just do agile). Indicators: Blog, volunteer activities   2. The person connects well with others at the level of emotions and needs (not just technical stuff).   3. The person is relentless and fearless when removing impediments


Project life cycle management - Maven vs 'manual' approach

I have a question concerning the life cycle management of a/multiple project(s), more specific to the advantages/disadvantages of using technologies such as Maven. Currently we work in a continuous-integration environment but lots of things still need to be manually performed (dependency management, deploying, setting up documentation, generating stats, ...). My impression is that this approach often leads to errors, miscommunications or things just are forgotten. I know and have used Maven in the past but in smaller environments and I was always really enthusiastic about it. But I was wondering if someone could share some insights, experiences, pros, contras, ... about the use of Maven (or similar technology) in larger environments and for multiple projects. I would like to use the suggestions made here to start the debate about moving to the next level in project management!


The real difference between web and native apps in mobile and smart devices

I still don't understand the difference between a native app and web or hybrid apps from the interface point of view. Now, apps such as Twitter, Facebook, etc. Are they native? or web? or hybrid apps? In those apps what is the most code was used? is it HTML and JS? or is it a language such as Objective C or Java? I'm still confused.


Syntax logic suggestions

This syntax will be used inside HTML attributes. Here are a few examples of what I have so far:               <input name="a" conditions="!b, c" />     <input name="b" />     <input name="c" />      This will make input "a" do something if `b` is not checked and `c` is checked (b and c are assumed to be checkboxes if they don't have a `:value` defined) * * *               <input name="a" conditions="!b:foo|bar, c:foo" />     <input name="b" />     <input name="c" />      This will make input "a" do something if `b`doesn't have `foo` or `bar` values, and if `c` has the `foo` value. * * *               <input name="a" conditions="!b:EMPTY" />     <input name="b" />      Makes input "a" do something if `b` has a value assigned. * * * So, essentially `,` acts as logical AND, `:` as equals (=), `!` as NOT, and `|` as OR. The `|` (OR) is only needed between values (at least I think so), and AND is not needed between values for obvious reasons :) `EMPTY` means empty value, like `<input value="" />` Do you have any suggestions on improving this syntax, like making it more human friendly? For example I think the "EMPTY" keyword is not really appropriate and should be replaced with a character, but I don't know which one to choose.


What's the best way to comment in a code review?

My team just started using crucible/fisheye for initiating code reviews whenever one of us checks something in. There are only 3 of us, and we're each encouraged to review the code and leave comments where we see fit. My question is, how do I best leave a comment on a line of code I see a problem with? I want to get my point across without seeming abrasive. I don't want to seem like I'm on a high horse and say " _I've been doing it this way..._ and I also don't want to seem like I'm trying to be authoritative and say something like " _This should be done this way..._ " but I still need to get the point across that what they're doing is not very good. **To Clarify:** This is a really good resource for _what_ I should be looking to comment on: code review: Is it subjective or objective(quantifiable)?, but I'm looking for _how_ to comment on it.


Auto Transaction Failsafe's, Third Party API's, Coldfusion Schedule Files

I have an automated invoicing web app and I'm trying to build in some failsafes and a structure that will, under no circumstance, allow an invoice to be double charged. All things working perfectly, the scheduled task runs and everything charges as it's supposed to. But there are a few scenarios we know of that can cause problems. I've had a DB server go down in the middle of a process, which lead to a number of duplicate charges. Also if for whatever reason, the file needs to be checked in a browser, a developer hits refresh before the file is done processing, duplicate charges will occur. There are a few similar scenarios to protect against, so you can see the need for a way to handle this given the sensitivity of the transactions (imaging seeing your power company auto charging you twice on your bank statement). Current configuration:   * Query   * API POST For Transaction              <!--- Parse Reply String --->     if response = "1"           - Insert Into Payments           - Update Invoice Amount Due           - Insert Into Transactions           - Email Accepted Notification          else           - Email Declined Notification      There's a few more smaller processes that happen between a few of these, as well as quite a few if statements but those are the heavy lifting parts. What I would like to learn and hear about are what would be the best way to handle safeguarding this with considering the Third Party API for the gateway being there? How would you break it up? One idea I had was flagging each process after it ran to give a record of where it was when it failed, and build out the query to handle it accordingly. Not sure how efficient or more likely how inefficient it would be.


Horizontal growth vs vertical growth

I worked in a lot of different environments since I finished University. I worked as software analyst in optics, numeric control, military and networking environments and learned using a lot of different tools. My main skill is software design (and C++ programming) but I learned Python, Qt, MFC (still used, I couldn't believe...), Bash and Perl. I also learned to configure VPNs, MySQL and tons of other tools and programming libraries. I also developed Linux realtime modules. Since I like a lot to learn new stuff and working on project not for long times (2 years top) I become a consultant: the best way to ensure horizontal growth. I chose this way because of personal preferences but also because my greatest fear was to end working on a sub-sub-sub problem of a sub application domain for 30-40 years of my life. I've met people like that. They have huge vertical skills in the application domain. For example a colleague of mine has been programming automation of machine tools in C++ for 20 years. He knows every single little thing he needs to know for machine tools but polymorphism is the most advanced C++ feature he knows and C++ it's his main language! My fear is basically that the job market could punish me in the long run. Of course my colleague could have the same problem: if his company goes bankrupt I wish him luck finding another job in the same niche. There is a trade off between vertical growth and horizontal growth. How do you cope with that? Do you think that vertical growth has more advantages in the long run? Please think in terms of job market and in terms of personal growth. Is there a way to balance the two kinds of growth?


How large non-OO code bases are managed?

I always see abstraction is a very useful feature the OO provides for managing the code-base. But how are large non-OO code bases are managed? Or do those just become a "Big Ball of Mud" eventually? **Update:**   It seemed everyone is thinking 'abstraction' is just modularization or data- hiding. But IMHO, it also means the use of 'Abstract Classes' or 'Interfaces' which is a must for dependency-injection and thus testing. How non-OO code bases manage this? And also, other than abstraction, the encapsulation also helps a lot to manage large code bases as it define and restrict the relation between data and functions. With C, it is very much possible to write pseudo-OO code. I don't know much about other non-OO languages. So, is it THE way to manage large C code bases?


Best way to keep large amounts of data (no relational database needed)

I would like to know what should be the best way to keep data on a server related to the following points:   * **Chat** logs   * **Heavy text content**   * **User references** like amounts of ids (1,4,14,524,23220,...) I'm using **PHP** and a **mysql** database but as obvious I know the topics above don't go well into mysql at large scale and maneuvering. So I would like to know how ( **no, i'm not asking for your work, just your 3-line orientation** ) exactly should I keep the data :) * * * Ok basically I keep my users in a sql table and another only for their friendships in which I have a field containing references related, _allegedly_ , to chat logs. Now the thing is I don't actually understand whether I should have that content in a file, keep the file path in that sql field and then retrieve the file when needed, parse it and display it to the user or keep it in a database such as mongodb, raven, couch because I've never used no-sql database and wanted to know of experienced people on it. Same goes for the **heavy text content** and user references. For example, in my users table I have a field containing its friends in the following manner 1,4,5,6,14,51,... and since I've been told this is bad practice and **certainly** should be used whilst dealing with large amounts of data that would need to be changed constantly I came here in a hopeful act of guidance and enlightment.


How do software projects go over budget and under-deliver?

I've come across this story quite a few times here in the UK: NHS Computer System Summary: We're spunking £12 Billion on some health software with barely anything working. I was sitting the office discussing this with my colleagues, and we had a little think about. From what I can see, all the NHS needs is a database + middle tier of drugs/hospitals/patients/prescriptions objects, and various GUIs for doctors and nurses to look at. You'd also need to think about security and scalability. And you'd need to sit around a hospital/pharmacy/GPs office for a bit to figure out what they need. But, all told, I'd say I could knock together something with that kind of structure in a couple of days, and maybe throw in a month or two to make it work in scale. * If I had a few million quid, I could probably hire some really excellent designers to make a maintainable codebase, and also buy appropriate hardware to run the system on. I hate to trivialize something that seems to have caused to much trouble, but to me it looks like just a big distributed CRUD + UI system. So how on earth did this project bloat to £12B without producing much useful software? As I don't think the software sounds so complicated, I can only imagine that something about how it was organised caused this mess. Is it outsourcing that's the problem? Is it not getting the software designers to understand the medical business that caused it? **What are your experiences with projects gone over budget, under delivered? What are best practices for large projects? Have you ever worked on such a project?** **EDIT** *This bit seemed to get a lot of attention. What I mean is I could probably do this for say, 30 users, spending a few tens of thousands of pounds. I'm not including stuff I don't know about the medical industry and government, but I think most people who've been around programming are familiar with that kind of database/front end kind of design. My point is the NHS project looks like a BIG version of this, with bells and whistles, notably security. But surely a budget millions of times larger than mine could provide this?


DDD/SOA Using .NET Message pattern(s) / Request Response with File Saving

I've done some research on this but I can't find more specific examples to help me with this. I'm new to SOA/Patterns in general please take it easy... :) Can you display an example of using the fileupload control in .net implementing SOA Messaging Patterns?


More efficient way to paginate search results

I'm making a website in PHP where the user can search a big MySQL database. The user is shown the first result. I want the _next_ button to take the user to the next result, and so on. The trivial solution is for each result page to execute the user's search query _again_ and use OFFSET and LIMIT to get the _n_ -th result that is displayed. But this feels like a Schlemiel the Painter's algorithm: re- executing the same query over and over to get to the _n_ -th result is inefficient. Since others must have faced this situation before: how is this typically solved?


Collecting user information for debugging and support

I have a Java application that I need to support. I'd like it to collect user information, such as system information: OS and hardware for easier diagnostics and support.   * Are there any security & privacy regulations I need to follow?    * Do I specifically need consent from the user to do this?


How can I teach my co-workers the SOLID principles?

I've got a group of very talented, yet new, developers on my team. I've fully embraced the SOLID principles in the projects I'm working on, and my fellow developers have seen the wisdom of the ways - but I am not an experienced teacher (nor am I an experienced student - everything I've learned I've learned on my own or from blog posts). I've been given leeway to hold teaching sessions with these guys, but I need to come up with some sort of lesson plan or else I'll probably just confuse and frustrate them and myself. There are plenty of resources on the web that describe or introduce the SOLID principles, but I haven't seen many that go in depth with them, and I've seen none at all that discuss how to _teach_ them. Am I missing some resource that's already out there for this? We're .NET developers, a mix of C# and VB.NET, so while I'll take examples in any language, .NET examples will be the best help as I won't have to translate them before showing them to my team. I should mention that we don't have a budget for books. Feel free to mention them, but bear in mind that if they're not cheap, they'll need to be _really_ compelling for me to consider. I won't be reimbursed in any case.


Validation of the input parameter in caller: code duplication?

Where is the best place to validate input parameters of function: in caller or in function itself? As I would like to improve my coding style, I try to find the best practices or some rules for this issue. When and what is better. In my previous projects, we used to check and treat every input parameter inside the function, (for example if it is not null). Now, I have read here in some answers and also in Pragmatic Programmer book, that the validation of input parameter is responsibility of caller. So it means, that I should validate the input parameters before calling of the function. Everywhere the function is called. And that raises one question: doesn't it create a duplication of checking condition everywhere the function is called? I am not interested just in null conditions, but in validation of any input variables (negative value to `sqrt` function, divide by zero, wrong combination of state and ZIP code, or anything else) Are there some rules how to decide where to check the input condition? I am thinking about some arguments:   * when the treating of invalid variable can vary, is good to validate it in caller side (e.g `sqrt()` function - in some case I may want to work with complex number, so I treat the condition in caller)   * when the check condition is the same in every caller, it is better to check it inside the function, to avoid duplications   * validation of input parameter in caller takes place only one before calling of many functions with this parameter. Therefore the validation of a parameter in each function is not effective   * the right solution depends on the particular case I hope this question is not duplicate of any other, I searched for this issue and I found similar questions but they don't mention exactly this case.


Why would the switch from C# to scala make sense in order to take advantage of scala's functional capabilities?

What is the benefit of using functional program for large scale software projects? I have heard it is pretty performance equivalent to regular OOP. I also have heard that it is more "mathematically elegant." Either way what are the benefits of doing large scale applications functionally? In particular why would the switch from C# to scala make sense in order to take advantage of scala's functional capabilities?


Is it possible to get dynamically generated html in asp.net tags using HTTP Modules?

I want to know if it is possible to write to a log/text file dynamically generated HTML in asp.net tags in an .aspx page using HTTP modules. By dynamically generated HTML, I mean the html content that asp.net generates in response to statements between the tags <% %> or <%# %> or <%$ %>. So when asp.net renders a page, it essentially converts everything into HTML. There is some static html written in the asp.net page, rest is what i call dynamically genrated HTML. My goal is to dump somewhere all the dynamically generated HTML content. Can it be done using HTTP Modules or any other mechanism ? Example:   If the .aspx page is like this   ...   `<td>Total Credit Line </td>`   `<td><%=creditLimit.ToString("C")%></td>`   ...   I want the HTTP Module to write in a log file, the HTML rendered by the <%=creditLimit.ToString("C")%> asp tag and all other asp tags on the page. The HTTP Module would be generic and can be added to any IIS website. Note that there would be no difference in the output that is seen by a browser.


How to tell node.js which javascript code runs on server vs client?

I am trying to learn the theory of node.js but can't seem to figure out how node.js knows whether to pre process it on the server or send it to browser for execution.


Algorithm for deciding change in gesture

I am developing an application where I am taking dynamic gestures as input and then mapping them to keyboard controls. By dynamic gesture, I mean for example hand moving from left to right or hand moving right to left. I have four gestures: hand moving bottom to top, top to bottom, left to right and right to left. I am able to recognize gestures but the problem is how to decide the start and ending of the gesture on a continuous video input. What is the most efficient and effective algorithm for detecting this on a video input?


Who would be responsive for damage caused after cloning foreign application but NOT running it as freelancer?

This is just theoretical question, without context. In case   * somebody hire me (as freelancer (I'm A1))   * client (A2) wants to develop **CLONE** of an existing application from B1 company   * after some time I give completed application to my client (A2)   * after some time original owners of application (B1) I cloned want to go to court Who would be responsive for damage caused to B1 company? Me as freelancer (A1) or my client (A2) which runs that site and take money from it?


What are the most cost effective ways of increasing your marketability to employers

There's a difference between becoming a better developer and showing you're a better developer to potential employers or to your current employer (ie. raises and such). I'm wondering what the most cost effective ways of doing that are. By cost effective, I don't just mean how much money said developer going to have to put out. Most commonly these are money and time. The latter is often more significant. For instance: Having your own blog can really develop you as a programmer, but it _may_ not be seen as a big deal to your current or future developers, and is potentially a lot of work, whereas some certs can go a long way with some employers and is much less work than building up a lot of quality content in a blog or developing a personal/OS project - even if the latter may be more fun. Assuming you're in the .NET space, what are the more cost effective ways that you can increase your marketability to your current or future employers? In an ideal world, we/I would do them all, but for the purpose of prioritizing, one should/could tackle the higher marketability/cost ones first before moving on to the others.


JavaScript vs third party libraries

I program in Java and it doesn't make sense to me to think about learning a Java library or a framework without knowing the actual language the thing is built with. Same goes for C. I always avoided JavaScript simply because I wasn't interested in the client side of things but that has changed now. I'm confused as to how and why do people avoid learning JavaScript and instead jump right ahead with a library like JQuery ? How can I program without knowing the features of JS, what is a prototype based language, functions as first class citizens, OOP, closures, etc. Also, are most of the things today in the client-side world built with the help of third party libraries?


Teaching kids to program - how to teach syntax?

I've been spending this week teaching kids (11-18) to program. Teaching them the core concepts and the logic has been going fine, but I've noticed one snagging point for them all: syntax. I feel like teaching them the syntax of the language comes a massive second to the core concepts and logic. However, with struggling with the syntax, they aren't learning as effectively. More often than not, their logic is good enough. The problems they have are related to syntax. Does anybody know of an effective way of teaching syntax? I've been thinking about creating a cheat sheet showing the syntax for different statements (assignment, if, while, for, etc) but feel this might be a bit of an information overload, has anybody any experience with using this method? Hopefully this question isn't considered off topic!


Java out of web and without GUI?

Is java used out of web and without GUI? To develop web applications you have to learn design stuff, html+css+javascript+ajax => it takes really a lot of time to learn it. Developing a GUI application also requires design skills. Is it possible to write something in pure java and what exactly?


Which data structure to represent a triangular undirected graph

I was wanting to create a graph similar to this in C++: ![enter image description here](http://i.stack.imgur.com/GtckL.png) The one I will implement will have more edges and vertices, but will use this triangle style. I was wanting to create something that I could perform various search algorithms on in order to find shortest paths to selected vertices (or longest without loops etc.). It is an unweighted graph to begin with; however, I was planning to give the edges weights in the future. I was having some trouble with how I would represent this graph for a couple of reasons: since I want to have more vertices (maybe 105 vertices), any kind of list would be tedious to write out which vertices are connected to which in every object (or is there a way to automate the assignment of members of a vertex object signifying the connectedness?). Also, I was finding it strange trying to implement it in a 2d array because the array is square in nature, and I am dealing with triangles; thinking about the weighting of edges and assigning a value in between two vertices made it even less intuitive with an array.


2 Dimensional Arrays in C++

I started learning arrays in C++ and came over a little side note in the book talking about 2D arrays in breif. I tested it out and i was amazed that it could give the programmer the ability to store data or information and lay it out infront of him in a spread sheet format. In a normal array to access elements i would simply do this:               int matrix[2] = { 1, 15};      But in 2D arrays :The only way it tells me to actually acces elements is by using a loop:               int fly[2][2];     int i = 0;     int n=0;     for(i=0; i<2; i++){         for (n=0; n<2; n++){             fly[i][n] =0;         }     }     for(i=0; i<2; i++){         for (n =0; n<2; n++){             cout << fly[i][n]<< endl;         }     }      I have tried accessing elements the old way:               int fly[2][2] = { 0};      but i noticed that this changes all the elements to 0 So..   1. Can anyone explain when i try accessing this 2D array like this all the elements change.   2. Is there another way to access 2D array elements without using a loop. Thank you all.


Reorganizing code based on dependencies

I'm wondering if there is a tool that can generate a dependency graph between C language object files and then analyze how to turn that graph into a DAG by modifying code that creates cycles, moving it to other source files. I've drawn a dependency graph by hand and I could probably make one by using makedepend or something similar, but the moving of functions also has to be done by hand. Sorry if that's vague, but that's about the best I can describe it right now.


Why null pointer instead of class cast?

In Java:               int count = (Integer) null;      throws a java.lang.NullPointerException. Why doesn't this throw a Class Cast Exception for ease in programmer understanding? Why was this exception chosen over any other exception?


In a javascript only web application, what state information should the URL contain?

I'm writing a single page web application that talks to a business layer via asynchronous RPC (encoded with json). I'm targeting fairly modern browsers, so I can at minimum control the URL after the hash. However, the URL won't really be what drives the application's state (that will be maintained by a javascript model layer), so I don't _have_ to do anything with it. I could even keep it the same the whole time without any implementation problem. The question is, what _should_ go in the URL? I won't go into the application because I'm hoping the question is generally useful. What kinds of expectations do users have about backward and forward buttons? About typing in a URL? Are there currently any generally applicable best practices yet for this kind of application?


Does macros support make Scala a Lisp dialect?

I've read recently that macro support in Scala is now official. I checked the documentation page and they are reminiscent to the LISP ones. In one of his essays Paul Graham writes that when "you add this final increment of power" to a language it is no longer a new one but a lisp dialect. Is this the case with Scala? It does not seem like a LISP dialect to me and the macro support in Scala is somewhat awkward for me.


Force user to extend class or use configuration

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?


Alternatives to Perl/python scripts for find & replace

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.


Making a design for a Problem

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.


MVC for our application?

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?


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

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?


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

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?


Some advice concerning Oracle and Java

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.


Professional Developers, may I join you?

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.


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

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?


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

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?