instruction
stringlengths
34
36.1k
The following SQL queries are the same: SELECT column1, column2 FROM table1, table2 WHERE table1.id = table2.id; SELECT column1, column2 FROM table1 JOIN table2 ON table1.id = table2.id; And certainly result in the same query plans on every DBMS I've ever tried. But every so often, I read or hear an opinion that one...
I'm a self taught C# programmer and up to now I haven't really been making use of Debug and Trace and feel as though I should use them. I've been leaning more on TDD to understand and get feedback from my code. The .Net Framework Developers Guide declines to specify general guidelines for strategic placement of trace ...
I am a Junior Programmer(4 months career experience so far) working on a Cross Platform Mobile Application (1 person team - so its just myself). I have a bug in this program/app which is pretty large (30 different header files, each with their own cpp file too). I have been trying to track down exactly what is going on...
This week at work I got agiled yet again. Having gone through the standard agile, TDD, shared ownership, ad hoc development methodology of never planning anything beyond a few user stories on a piece of card, verbally chewing the cud over the technicallities of a 3rd party integration ad nauseam without ever doing any ...
I've just started using ReSharper (for C#) and I kind of like its code smells finder, it shows me some things about my writing that I meant to fix a long time ago (mainly variable naming conventions). It caused me to reconsider some of my naming conventions for methods and instance variables. ReSharper suggests that i...
Is there text editor with c# syntax highlight which starts VERY FAST? I just want look source code some files in project and i donnt want wait 30 seconds while VS starts.
I have created a small and helpful project that I'd like to upload to a public repository and share under the FreeBSD license. What are the common steps I should make to apply the license to my code? I mean, what are the technical actions that should be done to apply the chosen license. More specifically: Should I put...
I have just finished reading Peopleware (DeMarco, Lister) and have researched on Extreme Programming (XP) a little before. As I see it now, the two approaches are almost exclusive to each other. Peopleware suggests to isolate programmers from any disturbance and sets priority on uninterrupted work in order to help pro...
When are Getters and Setters Justified is an excellent question which focuses on using getters and setters as part of the external interface. What I am struggling with is ... by having getters and setters there is now multiple ways to update the state of the object since private fields can updated directly bypassing t...
I'm wondering how far people should take the validation of e-mail address. My field is primarily web-development, but this applies anywhere. I've seen a few approaches: simply checking if there is an "@" present, which is dead simple but of course not that reliable. a more complex regex test for standard e-mail format...
I'm coding a Linux/PHP site for an organization. The site has two views, activated by a login $_SESSION variable indicating whether one is logged in as a member or not. I need to provide search functionality for both the public and for members. The members area is private. Note that Google Custom Search can't be used h...
I'm not sure if this is an OCD trait or not, but I find that sometimes I get completely blocked unable to continue what I am doing when naming a class (or function, or namespace etc) that I believe is to be used outside of a given project. An API for example. Or a utility class library. If the naming isn't exactly righ...
Is it possible to create a web application/service in PHP in which the backbone of the application/service is really a linux script and PHP is just relaying the data from the script? The linux script requires certain types of hardware and drivers in order to execute smoothly. I will be hosting the web application and l...
Right now, I'm trying to learn a well documented software engineering. I knew that if we code using Object Oriented concept, we can do software design concept using UML. But what if we code using procedural programming, how we do software design? as my understanding, UML is for OOP. And do you have any references in in...
Too often, I can see that there are many viable programmers without college degrees in Computer Science, Informatics, etc. Now that I've been reading more articles about underperforming education and the insignificance of college degrees (especially as a programmer), will a college degree ever hurt my employability? (...
Possible Duplicate: Should a manager (or CEO) in an IT company have an IT background to perform in the organization? My project manager at the company I work at, has no technical knowledge in the websites we build. I think this is obviously acceptable, however when we get questions about how certain parts of the we...
Working in a large organisation, it is often the case that the members of the development team are not able to get direct access to the client to gather requirements. Is it possible/advisable to give a list of questions to an account manager so that they can gather requirements on your behalf?
I'm new to JavaScript. I've read JavaScript: The Good Parts and half of Professional JavaScript for Web Developers. Now I want to follow this advice - find the best sites and look at their code. As suggested by Crockford in Coders at Work: Reflections on the Craft of Programming I want to find the best sites programmed...
Which sessions of work are more productive for programming: short (<= 30 minutes), mid-length or long (>= 2 hours)? In which cases? (Consider coding new functionality, doing small modifications, tweaking UI, refactoring, debugging, learning API, trying to understand other's code). What can you tell from your experience...
Jeff Atwood's blog post on Amazon's Mechanical Turk suggests that it should not offer monetary rewards but rather intrinsic motivation, "motivation that is driven by an interest or enjoyment in the task itself, and exists within the individual rather than relying on any external pressure." How does a team member (a man...
I want to introduce the concept of unit tests (and testing in general) to my co-workers; right now there are no tests at all and things are tested by actually performing the tasks via the UI to see the desired result. As you might imagine, the code is very tightly coupled to the exact implementation - even resulting i...
We have many windows services and web apps which all rely on a lot of common settings. Currently we use just appSettings as needed and they are referenced by key. Some of the settings are app specific and only know by the app team while others are environment specific and only know by the deployment team. Also we hav...
As a Master's project, I am designing a simple operating system. It is being designed to run in 16-bit Real Mode on an x86 architecture. Ideally, I would like to develop this OS in C++, and only using assembly where necessary. Thus far, I have a boot loader written in assembly, that loads a kernel that is a mix of C...
A large list of "harmful stuff" related to software development is presented on cat -v. Is Qt harmful? What would be the rationale for considering to Qt harmful? Why would Tcl/Tk be presented as a superior alternative?
Recently, I started my first job as a junior developer and I have a more senior developer in charge of mentoring me in this small company. However, there are several times when he would give me advice on things that I just couldn't agree with (it goes against what I learned in several good books on the topic written by...
What are some DOs and DONTs for improving database performance using index? A DO would be a case in which an index should be created, or another indexes related tip that will improve performance. A DONT will be a case when an index shouldn't be created, or another index related action that can hurt the performance.
I got a question today from my manager asking me my thoughts on what is considered an acceptable design for authentication of a web form application, especially in regards to the nature of many popular browsers to "Remember Password" for your typical user name password login fields. I am having trouble coming up with a...
OK. Let's say you're working on a textbook scrum project. You've got a scrum master collaborating with a product owner. The next sprint is UI-heavy - by the time your coders start building screens, you really want to have some idea what they're going to look like. Who does the wireframing, and when? The product owner? ...
I might be missing something with the Facebook and Twitter logins APIs. Something that is blocking me from understanding how they would be used in mobile applications. Both APIs seem like they need to redirect you to and then back to a website. How would that work from a mobile app? Or is there another way to use these...
If I create a controller that has a method ActionResult UploadFile(HttpPostedFileBase file) Where is the best place to add the code that will verify that this is a good and useable file? The reason I ask, is I will have to do more checking than just the file extension. For instance; check number of columns in spread...
I don't quite understand the consistent bashing of null references by some programming language folks. What's so bad about them? If I request read access to a file that doesn't exist then I'm perfectly happy to get an exception or a null reference and yet exceptions are considered good but null references are considere...
I want to hear from you any advice and experience of writing comments in your code. How do you write them in the most easy and informative way? What habits do you have when commenting parts of code? Maybe some exotic recommendations? I hope this question will collect the most interesting advices and recommendations for...
Most engineering manager positions require X years of managerial experience in the job description. That means as an individual contributor I can never qualify. But this experience has to come from somewhere. How can I bootstrap the managerial experience? Is internal promotion to some lead position the only possible wa...
Let's say I want to initiate publication of some source code under an open-source license like Apache or MIT, but I know that I'm only the Creator of the source code in its initial form, and I'm unlikely to be the one who maintains it long term. I just want to get it out there and make sure it's free for others to use ...
I've got a database table which will grow in size by about 5000 rows a hour. For a key that I would be querying by, the query will grow in size by about 1 row every hour. I would like a web page to show the latest rows for a key, 50 at a time (this is configurable). I would like to try and implement memcache to keep...
In my software engineering course, we recently (briefly) covered testing. Over the course of the discussion some topics came up that made me wonder about the math underlying software testing (such as finer vs. coarser test sets, using equivalence classes to partition infinite input spaces into "testable" sets, etc). Ar...
I have begun doing a lot of javascript development recently, mostly front-end but also using node.js. As I am currently in the transition from large company to startup, they expect me as a front end developer to know how to produce semi decent designs (Which I cannot) I am looking for a book (or set of screencasts) to ...
The type of data I'm hoping to collect is a little specific, and unfortunately I'm under NDA and the data is a core part of the business plan so I'm not at liberty to post it online. I've come up with a similar example, so please bare with me and pay no attention to the flaws of this hypothetical service. Say I make an...
Hello fellow designers, I need your help yet again. As you all know from my last question that I am new to the design industry (and a recent graduate). This is turning out to be an obstacle in my profession. The client I am working with now, insists on changing everything I ever present to him. I am working on redesig...
I have some questions regarding whether to crash or report errors to the user. We are developing a web site and mobile clients in which we allow our users to report any bugs and crashes through e-mail. We require the user to send the e-mail from their e-mail account, so they can be identified. Here are some questions r...
I'd like to hear my fellow programmer's thoughts on the issue of parametrizing agent based simulations: Consider: Simulation core, including geometry, collision tests, some rules Different agents (modelled in OOP-fashion: has-a, is-a, abstract interfaces) Agents have different sensors, different actors, different cont...
This is the scenario: I'm on this project for which I wrote 4 Node.js scripts that act as "servers" for some service (they have to be separated). I also use Redis, that is another service to keep an eye on. The system is not yet in production (the reliability of it will raise another set of problems, but not now). Whil...
In the company I'm currently working on, we've been doing pair programming for a while now. In the current project, for the last couple of days, we've been trying to make our pair programming a little better, so we even have a timer now to ensure that the swap between driver and navigator happens often enough. For chan...
I'm currently developing a web-app by myself and have made it a point to use descriptive variable and method names (sometimes at the expense of brevity) in order to minimize commenting. The plan was to code each method using this strategy, then comment after I've completed the method I was currently working on. However...
I use ISO 8601 to represent dates & durations and all is OK. But now I need to represent relative dates and durations like: The date for first day, at midnight, of the next week All the last month period. In fact I need to have a syntax for it, I prefer a standard one. I don't need code (I yet have all the code) b...
I have used a couple of the hosted SCM's like Unfuddle and Codespaces before and I like that they have Project Management tools built in. I've started using Mercurial and really like it, I would like to make the switch to it, but I can't seem to find any hosted mercurial solutions that contain project management tools...
We currently drive changes to our process through the following mechanisms: Weekly wrap-up meeting Project postmortem We discuss what isn't working, what is working, etc. I use these settings to introduce new practices, and eliminate ones that aren't working. We usually only make 1 change at a time and try it for ...
It seems to me that programmers have an increasingly uphill task of staying up-to-date. In my efforts to improve my programming ability, I am in search of the essential design patterns that are commonly used in computing (more specifically around .net). For example, should I bother to memorise: Search algorithms? MVC...
I have an AccountModel and a page where the user can upload a file. What I would like to have happen is when the user uploads the file. The PageController does something like the following. this is a quick attempt just written in the question to illustrate my question. public class PageController : Controller { pr...
What is the definition of C-based language? Is C# considered to be C-based? Is Java considered to be C-based? Furthermore, what does it mean for a language to be based on another language anyway?
Say you are going to build a fairly large website. Would all the pages be designed before they are built, or would all the pages be built and functional before they are graphically designed? I am a programmer and a graphic designer. When build a new website I usually have a rough outline of all the pages I am going to ...
I have a problem convincing my team mates why we shouldn't use (directly reference) the controller in the view when developing components in the spirit of MVC. I have invoked decoupling and natural intuition, but still those arguments didn't get through. They say, in their defense, that this is a normal compromise. Wha...
Possible Duplicate: How do you dive into large code bases? I am currently a student and started programming a few years ago. I am able to write complete working software in many languages. However, there is something that bugs me about contributing to open source projects: how do you understand how the organization...
I have to build a new application from scratch, so I want to implement it using MVC3 and try to follow general best practices as closely as possible. However, I'm developing it as a one man army. Does it make more to create the views first so I have some "Mockup screens" then build the Models and controllers? or t...
I am looking for software that I can use to "manage" multiple projects (5 - 10). Here are the features I would like but any recommendation is welcome. Bug/Feature tracking on a per project basis. Some way to keep all documents, diagrams, specs, requirements, in one place with the project. Better yet a tool where all t...
I work at a larger startup with a maturing codebase. I've only worked here a few months. I have few issues to work on currently because we are near a release. I don't have many assigned issues / bugs compared to other developers who are polishing new features, and adding regress tests. I am not really sure what to work...
I learned of Compete.com and I am interested in how they track web traffic from other websites. I am most interested in doing this with Python but when I Google I can't find snap. Probably my English. Could someone tell me of existing modules that I may look at, and in general how to track web traffic from other sites ...
I have a question regarding source control in a general sense and specific to TFS. Let's say you have a three-tier system (Development branches, QA main trunk and Production branch). At a certain point, the changes from the dev branches are merged to the QA branch and the QA branch is tested. After the initial test, "f...
I am dead set on moving over to a MySQL database for some huge data sets I'm working with but right now I don't have the time. In the meantime I am curious about a technical performance issue regarding speed between the two methods. Obviously binary jumping on a huge sorted file is a nasty hit to performance. The cha...
Background A local database contains nearly 1.3 billion unique rows. Each row is indirectly associated with a specific latitude and longitude (location). Each row has a date stamp. Use Case The problem is as follows: The user sets a starting/ending date, and a range of values (e.g., 100 to 105). The system gathers all...
I've added a couple of user stories that address some technical debt to my Pivotal Tracker board. Should I consider them as features (keeping my velocity level) or as chores/bugs (lowering my velocity)? I understand it won't make any difference in the long run if I did one or the other consistently, but every time I ad...
Working on a project with a couple of classmates, and I've noticed that we get a lot of partial commits which are then corrected: Rev 249 Log: committing change foo, yeah! Rev 250 log: oh dear, forgot these files! Rev 251 log: oh my, how could I possibly forget another file in the *same* change? The obvious answer is ...
I was wondering would it be worth using a form of standard such as Hungarian Notation/Systems Hungarian? Why would I bother if everything I'm doing now is working fine?
My first commit in my project resulted in the nightly build being broken and people are all over me as we are nearing the release. I want to send an apology email that should sound sincere and at the same time hinting that this was my first commit and this would not be repeated any more. Being a non-native English spe...
Introduction To Software Testing (Ammann & Offutt) mentions on p.32 a 5-level testing maturity model: Level 0 There’s no difference between testing and debugging. Level 1 The purpose of testing is to show that the software works. Level 2 The purpose of testing is to show that the software doesn’t work. Level 3 The purp...
There are already few questions here on Programmers about organizing small teams, but we have a bigger (medium-sized?) team, and that's a bit of a different animal. So, my question is this: How do you organize a medium-sized team with a very large, older codebase? Or better, let's quantify it a little more clearly: The...
For any standard web project you will have server-side code, server pages, JavaScript and CSS files as your code assets. It's pretty standard practice for server-side code to have a test suite and a scripted build process to compile/package/deploy code. Builds usually go on a schedule after code has been tested and val...
I'm a junior developer at a company that has asked me to establish academic goals for the near future. I didn't realize how hard of a question this was until I could only come up with one answer, off the top of my head: Learn more Design Patterns What subjects have you learned, after you finished school, that have hel...
I am working in a .Net, C# shop and I have a coworker that keeps insisting that we should use giant Switch statements in our code with lots of "Cases" rather than more object oriented approaches. His argument consistently goes back to the fact that a Switch statement compiles to a "cpu jump table" and is therefore the...
I'm approaching the 1 year mark as a leader of a small development team (4 members, including myself) inside of a small software company. I'd like to give my team the opportunity to evaluate how I am doing as their team leader who is also a developer on the team. I find it's hard to get good feedback with an open ende...
Is it feasible that we have a layer of API simply for the reason so that people in the team don't have to understand the actual implementation of the individual components each of us are working on? I had this thought because I started to find that some times when working a project with a team of people (I am new to w...
There are some libraries, which are available in their versions written in many different programming languages, like for example Lucene, which is written in Java (as they say, 100% pure Java), but has also its versions in C++, C, Perl, Ruby, Lisp and some other languages. And I'm talking about implementations in these...
At my company we have strict limits on internet use. I often must use the poor mobile interface only for Stack Overflow. However, the site is very useful for work. How do I convince a manager to un-block Stack Overflow? Is there a summary of benefits available online for managers to look at?
We had an idea for starting a ecards service and were looking into the possibility of populating our site using photo/artwork APIs. Due to legal reasons, Flikr probably won't work, although I've started to scour the web for other options. Basically we just need two functions the user should be able to browse the sit...
Possible Duplicates: How can I be more productive at work? (additional context inside) How to code on a very tight schedule? Sometimes we create new code quickly. And sometimes we can't concentrate. Development process has different thinking stages. There is a fast stage when we create code as a result of our ideas....
Today a professor of mine commented that he found it odd that while SWT's philosophy is one of making your own controls by composition, Swing seems to favour inheritance. I have almost no contact with both frameworks, but from what I remember in C#'s Windows Forms one usually extends controls, just like Swing. Being th...
I have a problem on reporting progress to my employer. I am a part-time programmer, handling a software project for my school's (non-technical) department. Contact person: 1. The staff who actually uses the software and raises feature requests, 2. My boss (non-programmer), and she is not the software's user. The projec...
We currently have 5 developers working on quite large Silverlight application. We have 3 servers: Test User acceptance server Production Each person works on something completely different and rarely do they run into each other's code. When they do, they just merge it while checking in their changes. The biggest pro...
The development team I'm working with will be moving to .NET 4.0 soon, however, the data access class library we use still uses ADO.NET "classic", meaning SqlDataReader, DataTable, and the like. Meanwhile, it seems like Microsoft and probably the rest of the world is moving forward with Entity Framework and WCF Data Se...
I have been using netbeans for many years now and recently I have moved from PHP/Git/Netbeans to C#/TFS/VS10. It has been very good so far, yet I miss this one little feature I enjoyed so much in Netbeans is... local file history. Whenever I was working on something I could test different ideas and then simply revert...
Many moons ago I cut C code for a living, primarily while maintaining a POP3 server that supported a wide range of OSs (Linux, *BSD, HPUX, VMS ...). I'm planning to polish the rust off my C skills and learn a bit about language implementation by coding a simple FORTH in C. But I'm wondering how (or whether?) have thi...
I was reading the book Refactoring to patterns and was wondering how I can get chance to practice the skills, because without deliberate practice on new ways to refactor and use patterns, my skills won't improve. But office work requires me to finish each task as quickly as possible. Most of the time, the project's des...
Chrome 11 is now asking user permission to run both signed and unsigned Applets (yes, for signed applets the user is asked twice). Chromium team decided that this measure is needed even when the user is using an up-to-date JRE. Here's my bug report (which reflects solely my opinion: http://code.google.com/p/chromium/is...
I've been coding for about 8 years, however I still find inheritance is too flexible and sometimes it makes you totally confused with the code you have written. One simplest example would be: abstract class AClass { protected void method1() { if(check()) { do1(); } else { do2...
Up to now we use DAO 3.51 (MS-Access 97) databases with our application. We are considering using a newer version. Which versions are available? How about deployment? How about royalties/licence fees? Any recommendations about alternatives? This question should be easily researchable, but I failed.
I'm going to be giving a talk to my department next week about unit testing and test-driven development. As part of this, I'm going to show some real-world examples from some code I've written recently, but I'd also like to show some very simple examples that I'll write in the talk. I've been searching on the web for ...
I have designed a reporting system to be used in our enterprise level application. I am able to open source it as this is not our business, and we can gain improved code by contributing it to the community. My question, is there all ready a reporting system written in PHP, written for php 5.3 by the latest standards et...
Put very simply, my company's product is a webapp with a database backend. We have a stage environment and a production environment for each of roughly 100 clients. There is a separate database for each environment. The database contents come from a number of CSV files that are created and maintained by our (non-techni...
With the monetization of mobile apps being so popular, I'm surprised that extension developers are still mostly relying on donations as their primary form of compensation for their software. While this is, of course, not a problem, I find myself wondering why browser extensions and plugins are generally exempt from mo...
I have been recently hacking on a project I started a couple of months ago. It was a simple idea. Allowing people to collect achievements for code they shared on Github. So I started this noble endeavor, trying to rake in my friends to get coding and helping. I spent all my free time working getting this up and runnin...
I mean it as it is used in JavaScript. Just curious why this is not supported in more languages? Like Java for example does not have it? Seems to be a very useful operator to have.
I posted this question on Quora, but didn't get enough responses. reposting it here. I am a learner sitting at home and learning linear algebra, very interested on working in Machine Learning someday, but not sure a) what technical skills are needed fot the interview/job b) any relevant work experience are m...
I want to start web development, I have been learning php. I have experience in Java, Python, and C++ This experience has made me good at the back end side of web development. But I am terrible at design and graphics. I want to start website. What do you guys suggest I do? If your suggestion is to get better at graphic...
Just curious to hear from other people who may have been in similar situations. I work for a small startup (very small) where I am the main developer for a major part of the app they are building, the other dev they have does a different area of work than I do so couldn't take over my part. I've been with the company 5...
I'm in the process of finishing and delivering a web development project. The contract specifically specified that client is responsible for adding all content and installing. The deliverables specified are the WordPress theme. I ended up using a lot of content from their existing site because I needed it to make su...
Does the fact that anonymous self-referencing function closures are so prevelant in JavaScript suggest that JavaScript is an incomplete specification? We see so much of this: (function () { /* do cool stuff */ })(); and I suppose everything is a matter of taste, but does this not look like a kludge, when all you want ...
i know that UDP does not care about segment (packet) order and their arrival on the destination. then how on earth are we able to stream videos? if a segment is lost (doesn't reach the destination), destination has no idea about it. so, it can't ask the target to retransmit it. if a segment arrives out of the order, s...
I was placed on a project about three months ago that was until then under development by a single, newly hired developer because it was falling behind. To be fair, the project is an interface to a medical device that has a lot of subtleties and is relatively complex, so placing one person on the project who had no ex...
Pretend for a moment that something catastrophic happened; you're hacked, and your production database becomes a mess. How far (time) should you be from your rolling out your latest backup and resuming operations as normal? Of course, "immediately" is "ideal", but I'd like to see some real answers. Perhaps some existin...
I personally would be willing to pay $10 to someone who can offer to make microphone drivers work with one of my laptops under Ubuntu 10.10. I thought that other users could contribute to the same thing, and thus find a willing developer. Does there exist such a project(s)?