instruction
stringlengths
34
36.1k
I'm running Coldfusion 8 and SQL server 2008. I've been building serveral forms that insert data into the database from external users, we have a custom built security module built by the guy who I've taken his job. 1) How can we test our HTML forms to ensure that we're protected from SQL injection attacks? 2) How ...
I understand an "idiom" to be a common operation or pattern that in a particular language is not simplified by core language syntax, such as integer increment: i = i + 1; In C++, this idiom is simplified by an operator: ++i; However, when someone uses the term "idiomatic", I am not sure how to understand it. What mak...
Recently a friend of mine bought an inventory application from a vendor, who used an statement like "built based on 10000 lines of codes" as a marketing slogan to increase its market share. I've also seen other software claiming to being built with a special language (C#, PHP, Java, etc.), or based on a special technol...
For about 2 months I've been reading everything I can find for these 3 topics and I'm not yet sure I got it. Dependency Inversion Principle. Means you should always only rely on interfaces and not on their implementations. If your class depends on any other class, that's bad, because it depends on that second class' d...
I'm a C++ developer. I know how Windows works on the native level, but I'm not a big expert in C# and .NET. Now I need a C# developer in my team (all my developers are C++). How can I hire a great C# developer if I don't know C# at good level? How to ask questions, how to test whether answers are great or are with sill...
I am building a web service (PHP+JSON) to sync with my iphone app. The main goals are: Backup Provide a web view for printing / sorting, manipulating. allow a group sync up and down. I am aware of the logic problems with all of these items, Ie. if one person deletes something, do you persist this change to other user...
Possible Duplicate: What is “the Cloud” and how does it relate to development? First some context: I don't understand what people are asking when they ask "It it on the cloud?" Here is an example. I make a "website" with php that is two pages hosted on a dedicated linux box running apache. One has a form where y...
I have seen a lot of people (first comment) hating die(); instead of exit; As the follow-up comments on that post note, die and exit are the same - the attitude appears to be one of perception, with some feeling that one name is more appropriate in certain contexts than others. But why does it matter? If they do the s...
We're implementing a new centralized monitoring solution (Zenoss). Incorporating servers, networking, and Java programs is straightforward with SNMP and JMX. The question, however, is what are the best practices for monitoring and managing custom C++ applications in large, heterogenous (Solaris x86, RHEL Linux, Windows...
OrientDB looks very attractive from a functionality+license standpoint. I haven't been able to google up much in the way of reports by people who have used it. Can anyone cite particularly notable successes or failures?
Let's say I want to start developing a project (for the sake of example, let's use facebook, ultimate-guitar, and all recipes or AutoCAD, outlook, angry birds). All of these apps are successful and vary in the degree of "depth" and complexity. As a starting developer most of these apps and especially the web apps seem ...
We keep repeating "you have to pull first" (this is git and github by the way). Then you code a little, then get your tests to pass, then commit, then pull and push again. We give tutorial links, try firm / hard. The latest changes broke 2 dozen tests. We document everything. What other things can we do to help folk...
I'm trying to convince my co-workers about the merits of developing on local environments, but so far have had little luck in my quest. Outside of myself, the other developers with my company develop on seperate folders on the same server as our development server, using the same DB/DB Server/Web Server for all folders...
Is there any advantige using delegates instead of methods? For example: public void LoginAuthenticate(object sender, AuthenticateEventArgs e) { if (Membership.ValidateUser(lgUserLogin.UserName, lgUserLogin.Password)) { Func<string, string> getDestinationPage = (userLogin) => { //definition }; e.Authe...
Here is a logical statement: term1 AND (term2 OR term3) OR term4 What is an effective way of storing this information in a data structure? For example, should I use a graph, with a property on each edge defining the operator to the next term? (This suggestion doesn't make sense IMO, but it's a data structure that migh...
Suppose the middle tier servers are replicated 3 way and the backend database (MySQL, PostgreSQL, etc...) is replicated 3 way. A user request ends up creating some user data in the middle tier servers and I would like to commit this to the backend database in a way resilient to failures. A candidate attempt solution, f...
I'm considering using a Java stored procedure as a very small shim to allow UDP communication from a PL/SQL package. Oracle does not provide a UTL_UDP to match its UTL_TCP. There is a 3rd party XUTL_UDP that uses Java, but it's closed source (meaning I can't see how it's implemented, not that I don't want to use closed...
I'm a web developer interested in learning network. I work on Windows platform. Many of my friends and colleagures believe that to learn netwrok, I should become familiar with Linux platform. Should I? I mean, can't I learn network and it's concepts thoroughly on Windows Server platform?
First I would like to say that I'm not developer, but I love to code whenever I can. I mainly use Perl which is the language I use when doing System Administration. For different reasons (that I'm not sure of) I recently have been told to learn Java by my manager, so I'm starting to do so. I was thinking that I should ...
Recently in an interview, one of the questions was 'Why do we use MVC?’ I just answered that it is much closer to how, many of the real world systems are! Explained the benefits it has when it comes to Maintainability, Scalability etc. But they were not convinced and finally told me that MVC is used mainly as it 'enabl...
Code Complete (2nd ed.) says: "If you pass a parameter to a routine, use it. If you aren't using it, remove the parameters from the routine interface." However, in the past I sometime had to do that. Consider the following example: Assume that we have an abstract base class called Food, containing a pure virtual functi...
Imagine a situation where several people are sent to an interview and only one has to pass. His knowledge is enough for the project. However, the customer asked for the several candidates so he can choose the best one. And the other people from your company are already engaged in other projects and should not get the j...
On my team, we carry out code reviews (without the use of external tools). The reviewer produces a list of items which the developer should address or consider and then essentially leave them to it (after discussing with them the relevant points) without follow up on their subsequent changes. Occasional spot checks s...
I work on a huge project (more like a tangled up combination of dozens of mini projects that can't be easily separated due to poor dependency management, but that's a different discussion) in Java using eclipse. We've already turned off a number of warnings from compiler settings and the project still has over 10,000 w...
I am trying to find a way to make the projects I work on more transparent to the business size, even though backend programming is not quite visible all the time. So in order to this I want to try ATDD and building acceptance tests with Cucumber. Is there a friendly way to show these tests to the business - I still thi...
All I have seen on SQL injection attacks seems to suggest that parametrized queries, particularly ones in stored procedures, are the only way to protect against such attacks. While I was working (back in the Dark Ages) stored procedures were viewed as poor practice, mainly because they were seen as less maintainable; l...
This isn't a programming question per se - more about application management. I work for what started out as quite a small company, which has grown rather quickly and become very succesful in a relatively small period of time. Nearly all trade happens online, and our IT team is very small relative to the amount of mone...
I may potentially have some work to implement new features to a client's existing web application. (I didn't write the original app). I've never made an app that wasn't written from scratch, and I'm worried about integrating the new features without disrupting the service for too long (or at all). I don't think the cli...
Possible Duplicate: What should a developer know before building a public web site? Are there any books or resources on html/css/js and web design best practices? There are plenty books which just learn the basics - syntax and other stuff which is not quite difficult, but I can't find use cases, real examples, how p...
I work at a small software company where the owners are also the managers. My concern is that any and all progression in technology is met with utter disdain by management. Some of the comments are as follows: LINQ, nHibernate, and ORM are bad programming practice, we will never use them. The majority of large applica...
Our web application has a complex access control system which incorporates role-based and object-level privileges. In the business logic layer, this is implemented by a component that obtains (and caches) all the necessary data with a batch query and computes the user's type and level of access to any object in the sys...
I used to create a lot of abstract classes / methods. Then I started using interfaces. Now I am not sure if interfaces aren't making abstract classes obsolete. You need a fully abstract class? Create an interface instead. You need an abstract class with some implementation in it? Create an interface, create a class. In...
How would you go about defining a standard? I am defining a protocol for a sort of thing that does not exist yet and I would like to create an RFC for it, and use a well-known port number provided by IANA. How do I start?
You know what they're asking for. You know what they really want. However, technically the way they wrote it is with a litmus test of requirements that don't match what they want because they don't understand what they're asking for. Should it be a part of our job to match the spirit of the requirements, or match ridic...
I recently began working with version control in my web-development using subversion. This works great for managing the files I develop but does nothing for the changes I sometimes need to make to the databases. To my knowledge the server I'm working on doesn't have any DB management systems in place and I likely wou...
What approach could You suggest, If I don't have mysql or other database support on webhost, but I need to store data ( textual information ) for website somewhere. It's informative site for school - approx 20 to 50 visitors per day, 6 to 7 categories with 3 to 5 subcategories. Would xml files be normal ?
I wonder if PKUFFT is Chinese algorithm/library and is it really better than FFTW, MKL? Edit: I will elaborate. My personal programmers interest is in fast parallel algorithms like FFTW3, which was my favorite until I stumbled upon chinese claim of superior run with PKUFFT. It is on google, if you search for FFTW3, Int...
I have a fairly strong background in C and Assembly and I am starting to look into basic compiler and operating systems design, but my biggest problem is where I should really start, seeing as both are very large project types to undertake. My question is, what are some good resources or good known starting points when...
So, I'm developing some database-driven RESTful Java web services, using Hibernate and MySQL. For testing purposes, I'm using the H2 in-memory database. H2 is nice and fast, so this has worked out really well. The only problem is that populating the DB tables prior to my tests is sort of tedious. I basically create...
I am into programming since last 3 years. But I seems to be lost in it. I am not able to get good at it even though I code everyday. suppose I solve one problem, I will wander from solution to solution and implement some other solution. I cant focus much. I get many defects for the code I write. I afraid of code I dont...
I'm just curious, I'm building a web app with a User model which has role-based permissions. I have the following roles: Visitor (anonymous user) ?? (logged-in user) Moderator Admin I'm having a hard time figuring out what to call a logged-in user. I want to just call them "users", but I find that having a role with ...
Im new to Socket programming and im building a Socket over TCP-IP system with this architecture: Server: Basically a TCPIP Listener that waits for connection from the clients. Client: It knows the server Ip and try to connect, when the connection is set i can send commands from another client that acts like the ADMIN....
I am working on a website theme. I want to use a repeating background on the <html> node so I can have another background overlapping it on the <body> node. Otherwise, I would add the first background to the <body> node and then have the second background on a nested <div> with 100% width/height inside it. I am going f...
This might be a philosophical/fundamental question, but I just want to clarify it. In my understanding a Finite State Machine is a way of modeling a system in which the system's output will not only depend on the current inputs, but also the current state of the system. Additionally, as the name suggests it, a finite s...
A developer of my company was promoted to a new possition that practically manages us developers, and he assigned to 3 people in our team(including me) some big proyects done in Java/Delphi/.NET, the point of being a team was so that each of us could manage each other's code in case that someone goes on vacation or lea...
I am just wondering, is there any practical method or technique or even tricks to get avoid those "unknown unknown" bugs especially those nasty and random ones which are often emerge at the last minutes or at least to keep these things at a minimum level. I ask this because when you work on a new platform or use certa...
I have a general question about databases. We usually use the term collation with databases. I would like to know how its different from character set. I guess collation is a subset of character set. If its true, what is the purpose multiple collation under a character set.
I'm writing a low-level emulator (in Java) of the IBM 1620, a late-50s computer. By "low level," I mean that the lowest observable unit of work is the 20-microsecond "trigger" -- machine instructions achieve their objectives by running a series of these triggers; and I've written code to emulate almost all of them. B...
Our project head is a genius software architect, a gentle and considerate person in general, a geek by nature and delicate by voice. But, at times, we (my teammates and I) differ in opinions -- especially of software architecture issues, system design issues, UI issues, etc., with our leader. When and how (if ever) sho...
This might be asked a thousand times but couldn't find the answer. I just wonder how you people handle the business logic errors? Im trying to do a nice api for my business model. Some methods have quite a lot of validation and I just wonder how should I report them if something goes wrong? Returning true or false or n...
I'm currently working as a software developer and studying for a software engineering degree (the former whilst not doing the latter). I'm confident in my ability to do my job competently, but I feel I could do it better. I know my greatest pitfall is in my business skills; for example, I often don't understand at firs...
I would like to know which convention (if any) you use for your PHP web application projects.
We're currently in the early stages of building a substantial system, aiming to do much of what several existing systems do, in a flexible, extensible, maintainable way. It will support multiple complete instances for different customers. One of the things which keeps coming up across the whole system is: where shoul...
Has anyone purchased Design Pattern FrameworkTM? Are these samples worth investment? Are they practical? What are the pro and cons of the guidelines? Anyone used this in the real-world development?
I found the term here: https://developer.mozilla.org/en/Mozilla_Web_Developer_FAQ I know what a XML parser is. I can't understand; what exactly is an expat XML parser?
The Wikipedia article on prototype-based languages contains the following paragraph: Almost all prototype-based systems are based on interpreted and dynamically typed languages. Systems based on statically typed languages are technically feasible, however. In what ways does a static type system impose restrictions or...
I usually work in a web design company, but my manager also has his own company. He is a designer basically and he catches the projects with clients and then I do his work during weekends or whenever I have time. He is very bold. He has no knowledge of programming at all. But I have seen that many times he catches proj...
There is a company in my city which does supply chain optimization, data mining and predictive modelling. I tried hard but was not able to enter there. Now I want to do similar sort of work. They apply many optimization techniques which makes the decision making of company easier. Presently I know Python, Django, PHP, ...
I'm looking for a better way to deal with the design I have here, I'm not confident it's really suitable. To give this some context, lets say we have a bunch of groups, one group could be "SQL", and another could be "Cooking". The SQL group would have books such as "Normalization" and "T-SQL", while cooking could have ...
For fairly small, non-complex web applications, we have utilized jQuery to make asynchronous calls to an ASP.NET web service for interaction with our Sqlite data store. This has proven to be a pretty clean way to isolate the application tiers while taking advantage of the powerful client-side functionality of JQuery. H...
Consider the following elements in an event-driven architecture: Observable Object Event Dispatcher Observer(Listener) Now, we have two messages: From Observable Object to Event Dispatcher From Event Dispatcher to Observer(s). How do you decide to pass these messages Sync or Async? Do you use any particular API (i...
I recently sent in an application for a position that I am qualified for and received this response: "We regret to inform you that your current qualifications do not match those needed for our current openings. We will retain your resume and if a position opens that closely matches your skill set, we will contact you a...
I know you'd have to use Unicode. And that Japanese is read vertically and reverse of English. What are some of the things one would have to take into consideration?
Backround: I am currently a Junior in college working towards a degree in MIS. I've been interning with a compnay for a 3 summers and a winter break in there. With only 11 months to go before I start marketing myself to potential employers I've decided to teach myself as much as possible about languages and platforms t...
I know that Microsoft has said ASP.NET MVC is not a replacement for WebForms. And some developers say WebForms is faster to develop on than MVC. But I believe speed of coding comes down to comfort level with the technology so I don't want any answers in that vein. Given that ASP.NET MVC gives a developer more con...
It seems that it's necessary to remember all sorts of syntax to be able to program. If a person doesn't have a good memory for remembering names, will it be more difficult to learn to program?
looking through the docs of posix' pthread_mutex_t and window's mutex and CRITICAL_SECTION I noticed there is no easy way of checking whether the current thread holds a specific mutex posix' pthread_mutex_t can be tested when it's not reentrant but that is only a artifact of a non-reentrant mutex ofcourse checking whet...
I am wondering, in tight deadlines, who has time to implement design patterns? It is a lot more work and programming overhead to get it right the first time and within time frame. I know that it has long term advantages, but were you able to implement any design pattern correctly when the client is sitting on your head...
In programming languages, when numbers (either integer, or real) are printed out, are they firstly converted to the codes of the readable characters that are meant to represent the numbers, and then the codes are then decoded into the readable characters? For example, in C, functions such as printf can print out the va...
Is UTF-16 fixed-width or variable-width? I got different results from different sources: From http://www.tbray.org/ongoing/When/200x/2003/04/26/UTF: UTF-16 stores Unicode characters in sixteen-bit chunks. From http://en.wikipedia.org/wiki/UTF-16/UCS-2: UTF-16 (16-bit Unicode Transformation Format) is a character ...
Say I have a class Person: class Person { string FullName; int Age; } And I need to load a list of Person's from a plain text file. The text file could be in one of two formats. I want a method such as LoadFromFile(string path) that will 1) detect the file format 2) parse appropriately for the file type and 3) r...
I have been working on a product line since my senior year of college for my current employer. Now several years out of college I am in a position where I am giving estimates for change requests on this same produce line. Please note that our software lead still approves the estimates, but is hands off during the pro...
When working on open source projects should one time contributor's (I mean like single or minor patchset, nothing that would be considered a major contribution ) be listed as an Author? or should they simply get listed in say an acknowledgement section somewhere? If you contribute a small patch to a project where do yo...
I have done C and C++ and now I want to start my career as a web-developer. I read a lot about web-development and came to know that there were two types of developers on the web, 1. Client Side Developers. 2. Server Side Developers. I want to keep my focus on server side development. I thought that it would be best...
How much should one worry about the "edge cases" in an application, especially when creating the UI?
I want to choose JavaScript as my main development field, alongside HTML and CSS to become a developer commonly known as front-end developer. But I don't know how to become a JavaScript professional. I've read many books and learned the pieces including data types, syntax, tools usage (like IDEs, Debuggers, etc.), jQue...
I want to write a program that solves sudoku. So, I found some sudoku algorithms on Wikipedia. Can I use them or do I need to develop my own algorithm? Also, do I need to ask the specific license holder's permission?.. If so, how would I go about obtaining that permission?
Possible Duplicate: trust factor in code review Where I work, we have very few rules about what constitutes a code review. In addition to going through the code, I tend to briefly test out the software I'm reviewing (in my case, it's always our website) just to see if there are any glaring errors, at least if the pr...
I've been an ASP.net web developer for about 2.5 years now. I would describe my technical training before that as being "classical" C++. It seemed like it took an eternity to get up to speed with ASP.net. I kept wanting to think of programming in VB.net and C#.net as if it were C++ programming, which of course, it isn...
Does this depend heavily on the type of project (e.g. scientific software vs banking system vs game)? If so, in which areas is the difference the highest and lowest? In your experience, is it safe to say that as a rule, the time it takes to run unit tests is at least one order of magnitude larger than that of building ...
I have professionally working with Zend Framework for about a year. No major complaints. With some modifications, it has done a good job. I'm beginning to work on a side project where I want to heavily rely on MongoDb and Doctrine. I thought it might be a good idea to broaden my horizons and learn another enterprise le...
I am trying to think of the best way to do the following: I have a list of tasks stored in the database. A task has a priority assigned to it. You can change the priority of a task to reorder the order they should be carried out. I am thinking of something very similar to Pivotal Tracker. So imagine we had the followi...
I love the whole user experience/interface thing and put a lot of jQuery and JavaScript (pure JavaScript for HTML5 stuff, like canvas, file API, etc). The problem I face now is that my codes are growing large, 3-4 files per project with each file around 1000 lines of code, and maintaining and extending them is becoming...
Second attempt to ask my question more concisely. I want to say I am a Scala fan, or at least I want to be. I've resigned myself to learning one of these functional languages [Scala, Haskell, Erlang]. I've dabbled in all of them, far and away I have spent the most time trying to understand Scala. I've honestly used ...
Yesterday I read this great article about Concurrency in JRuby from EngineYard and I realise I need to leverage my skills about concurrency in Ruby, by mentioning Ruby here I mean it could be all implementations of Ruby : JRuby, Ruby MRI, Rubinius, Ruby on Parrot / Cardinal except IronRuby, I don't code in Windows Envi...
I want to convince my partners that we should have a spec and that bugs should get fixed before writing new code. Should I refer to the Joel test? Do you think that the Joel test is up to date? I think that not having a spec is bad project management. Do you agree with the Joel test? Could you add something? It doesn't...
Hi everyone I have just started taking part in online coding competitions.I would like to know which language would be better as regards efficiency and ease of debugging. I tend to avoid c++ and generally go with java. 1. Would some other language be suitable? How about c sharp or python or some other (No issues with l...
There is a lot of conversation regarding best practices1 in software development. I've seen at least three major points get a lot of discussion both on SE and elsewhere: What qualifies as a best practice, and why? Are best practices even worth discussing in the first place, because it's reasonable to assert that no pr...
Possible Duplicate: How much HTML and CSS should server side developer know? What will happen if someone wants to be a web developer but not interested to learn the client side scripting or programming. I am asking this question, because I think it is not possible, but a few days back, I had an argument with one of ...
I was wondering about good object oriented class design. In particular, I have a hard time deciding between these options: static vs instance method method with no parameters or return value vs method with parameters and return value overlapping vs distinct method functionality private vs public method Example 1: Th...
Is it true that to know how many visitors visit my website, some kind of tracking code had to placed within that page itself, and there is no other way around it? Even if we use something like Google Analytics indirectly they are also placing some kind of tracking script within our pages right? Or is it true that even...
We have Python middle-tier for our Web App . Now we need to render 3 different HTMLs... for older browsers (simple read-only interface) for HTML5 browsers (LOT more complex than older browsers) for mobile website (simple XHTML-MP) Now, we need to keep the Python middle-tier completely independent of any HTML -- just ...
Many times you encounter something like "team-worker" or "enthusiast to work in a team" or stuff like that in employment ads which state that they want you to be or become a good member of a development team. Who can be regarded as a good team member? Which qualities of a developer can be regarded as good points regard...
After working my way through SICP I decided to work though some Project Euler problems using scheme. In this particular problem I am trying to generate an infinite stream of integers however I am recieving an error from the MIT Scheme interpreter. ;Aborting!: maximum recursion depth exceeded This leads me to believe m...
I've been wondering how to determine if I know functional programming. By know I mean in a Journeyman sense, not a master, but competent enough to do the work. I like languages w/ query/data shaping constructs built in, but is knowing the ins and outs of maps, filters, and aggregates in the form of Linq, Sql, and Reac...
I've read that Facebook uses this technique DB sharding to manage its data volume and that the idea of cloud computing is elastic resources. So I'm wondering does the cloud instance take care of sharding for you automatically? Or do you still have to do that part manually? And if you do have to do it manually - then...
Intel processors (and maybe some others) use the little endian format for storage. I always wonder why someone would want to store the bytes in reverse order. Does this format have any advantages over the big endian format?
I have designed my first website recently. I created my own blog like thing in PHP. I write articles and below the articles there is a place to add comments. Sometimes I get random comments something like 'sd$^&(87&(*2d10hsdasko' with no meaning. There are hundreds of them. I think some silly person with lots of time m...
In an e-commerce site, when adding an item to a cart, I'd like to show a popup window with the options you can choose. Imagine you're ordering an iPod Shuffle and now you have to choose the color and text to engrave. I'd like the window to be modal, so I'm using a lightbox populated by an Ajax call. Now I have two op...
I'm working at a startup software company -- 3 developers, less than 15 employees including the CEO. We deal exclusively with Windows Mobile, the .NET CF, and passing the information gathered from our handheld application to and from our website. My director and I just had a meeting over an urgent project that hasn't b...