instruction
stringlengths
34
36.1k
I have seen weird database access practices in .net. I have seen stored procedures for every database tasks. I have seen every database property name is preceded by it's table name. I have seen fully separate layer/.dll for very few or no business logic. I have seen along with ORMs, there are separate data access layer...
TL;DR: Quick and dirty code, or "correct" (insert your definition of this term) code? There is often a tension between "efficient" and "effective" in software development. "Efficient" often means code that is "correct" from the point of view of adhering to standards, using widely-accepted patterns/approaches for struc...
Should you be an OOP expert if you're developing in ASP.NET?
What should drive the decision behind doing development upon one or more than one framework? For instance, an ERP is (mostly) run on a Windows station. It leverages full access to device's resources, like printers, barcode readers, fingerprint readers and the like. It's usually more responsive and easier do develop wit...
It seems to be Java orthodoxy at this point that one should basically never use public fields for object state. (I don't necessarily agree, but that's not relevant to my question.) Given that, would it be right to say that from where we are today, it's clear that Java's public fields were a mistake/flaw of the language...
When adding salt values to a hash value for something like a password that cannot be stored in plain text, what is the best place to get the salt values come from? For context, let us suppose this is for passwords on a webpage login.
So..I am going to have a phone interview with a company tomorrow. I never had a phone interview before so I don't know anything about it except that I am going to talk to someone over the phone. This is a PHP developer position. Is she/he going to ask PHP questions only? or is she/he going to ask any other questions? P...
I've recently been learning F# for fun (I'm a VB.NET/C# dev), and I really like some of what it has to offer. Theoretically that is. But I'm having trouble thinking up of scenarios where I would choose to code in F# rather than in C#. Any ideas?
I have a personal web project I cut my teeth on learning how to program. I wrote it in PHP and learned as I went. I eventually I re-factored it to use MVC and removed all mixing of php/html. Right now it has no users, save myself, and it makes no money. I have a strong desire to rewrite the entire app. Which really isn...
I have been asked to give a presentation to a non-technical audience on what Java technologies are currently being used in the enterprise world. The goal is to give this non-technical audience the background they need to understand what engineers are talking about. It's part of a broader series of talks that I'm giving...
I was wondering if anyone had any resources or advice related to using architecture patterns like MVVM/MVC/MVP/etc on small applications and tools, as opposed to large, enterprisy ones. EDIT: Most of the information I see on application architecture is directed at large, enterprise applications. I'm just writing small ...
It seems nowadays all the develop teams have both software engineers and product manager. I am a newbie to the software industry and I wonder what is the difference? Is it necessary for a Product Manager to have a programming background? How to divide work between Engineers and Product Manager?
We are following scrum in our project. I see most of the times the scrum master allocates the tasks for us. However, I read from many scrum books that scrum works the other way around (the 'pull' approach) and team members pick up tasks or features. Is scrum master assigning tasks the correct approach or does it go aga...
What kind of information do you require from the project management team before you can proceed on a project? Is there a certain format they utilize on Programming Requests which helps you to understand exactly how the development team can succeed with this project. Example: I always like it when project managers moc...
Variable names can be written in many ways, but the most common that I'm familiar with are: thisisavariable, this_is_a_variable, and thisIsAVariable. Which of these are preferred, and why?
I am a sandwich training student in a company that has a little informatics service who develop web app Until today, they work with simple php, a little CSS and no version control. So, the code becomes unmaintainable. The project manager would like to use php object, and i am the only one with some knows in it. But i a...
From my experience of working on several Java based projects, I've seen tons of codes which we call 'dirty'. The unconventional class/method/field naming, wrong way of handling of exceptions, unnecessarily heavy loops and recursion etc. But the code gives the intended results. Though I hate to see dirty code, it's tim...
PEP8 recommends using lowercase, with words separated by underscores as necessary to improve readability for variable and function names. I've seen this interpreted as lower_case_with_underscores by most people, although in practice and in Python's native methods it seems like lowercasewithoutunderscores is more...
Here's how I see it. There's machine code and it's all that computers needs in order to run something. Computers don't care about programming languages. It doesn't matter to them whether the machine code comes from Perl, Python or PHP. Programming languages don't serve computers. They serve programmers. Some programmi...
So, what do you use? int anInt = (int)aFloat; or int anInt = static_cast<int>(aFloat); // and its brethren And, more importantly, why?
I'm a junior developer and I'm working on a pet project that I want to learn as much as possible from. I have the following scenario: There's a WCF service that I use to retrieve and update data, lets say Cars. So it's called CarWCFService and has a GetCars(), SaveCar(), ... . It implements interface ICarService. This...
I used to coding in C# in a TDD style - write/or change a small chunk of code, re-compile in 10 seconds the whole solution, re-run the tests and again. Easy... That development methodology worked very well for me for a few years, until a last year when I had to go back to C++ coding and it really feels that my producti...
I am about to implement a API for my TCP/IP server written in Java. Right now I have a temporary method that takes a String, executes a command based on the String and returns a String basically like the following. public void communicate(BufferedReader in, PrintWriter out) { while(true) { out.println(handl...
I was just wondering if the programming language or database you use has any effect on selling your site to another company? I mean is it easier to sell PHP site than other language? How about database type? If I was using Redis instead of MySQL, would that make any difference?
I am in a bit of a bind. I have been contracted to create a small suite of applications for Android, iOS and WP7. Currently I am also on the market for a new notebook for development. Now the issue I have is I can either buy a consumer grade macbook and a laptop or I could just buy an 8gb Ram, SSD, i7 mackbook and virt...
I am implementing a voting system and need some input from fellow programmers. Do you see anything that could go wrong by having users input a valid email and perhaps have a captcha to stop automated voting instead of a traditional login and vote?
Samples coming with SDK are intended to provide best practices. So logically it looks perfectly valid to take code from them. But usually samples come under licenses, for example a lot of samples from Microsoft are released under Microsoft Public License (MS-PL). Samples are usually published to provide best practices ...
Say you don't have a debugger available, what would be an effective approach to debug code which doesn't work (as expected)?
Today at work one of my colleague reviewed my code, and suggested that I remove a set-only property and use a method instead. As we both were busy with other things, he told me to look at the Property Design section from "Framework Design Guidelines" book. In the book the writer just said to avoid: Properties with th...
I don't have much experience in working in software industry, being self-taught and having participated in open source before deciding to take a job. Now that I work for money, I also have to deal with some unpleasant stuff, which is normal of course. Recently I was assigned to add logging to a large SharePoint project...
I've seen several recommend use of IoC containers in code. The motivation is simple. Take the following dependency injected code: class UnitUnderTest { std::auto_ptr<Dependency> d_; public: UnitUnderTest( std::auto_ptr<Dependency> d = std::auto_ptr<Dependency>(new ConcreteDependency) ) : d_(d) {...
How would you manage if you are allocated a team of 5 with, say, 4 incompetent programmers and you are asked to lead? Obviously you can't code for the 4 guys (you can, but that is not a good idea. At least I burned out doing that). Have you come across these kind of situations? Edit: I think I sounded rude by choosing ...
I work for an in house IT shop. We use a scrum-like system. What we are struggling with now is getting the business owners to follow the process. They all like it in concept until they want something, then the process is for the other people. How do you convince them that following the process will give them more c...
There are two areas to possibly optimize for speed in: Where the most time is spent The code that is called the most Which is the best place to start optimizing? Often code that is called the most often has low execution times already. Do you optimize the slower, less called areas or spend time optimizing the faster,...
Hey everyone! By self-adaptive programs, I mean the programs which are able to adapt to specific situations. For example they are able to repair them selves or are able to change their behavior according to user's needs. Obviously they need some sort of A.I modules like Intelligent Agents or so on. My question is, what...
I've come across this is in a couple of different applications that I've worked on. They all used the ASP.NET Membership Provider for user accounts and controlling access to certain areas, but when we've gotten down into the code I've noticed that in one we're passing around the string based username, like "Ralph Water...
Some seem to say that one should avoid C99 features in C code as compilers don't really support those features. C99 is a standard from 1999, shouldn't these features be quite widespread now? Should one avoid using C99 features in new code? In legacy code? I happen to use some C99 features quite often, should I stop doi...
Possible Duplicate: Agile for the Solo Developer I am going to be starting a project soon and plan to use as much of agile methods as I can (CI, TDD etc.). What have been people's experiences doing agile development when working solo? I want to get good practices in place now while its a one person team so when I sc...
Currently working on multiple projects that need to share internal libraries. The internal libraries are updated continually. Currently only 1 project needs to be stable but soon we will need to have both projects stable at any given time. What is the best way to SVN internal libraries? Currently we are using the 'just...
I was speaking with an ex-colleague the other day about the most productive way to write code and he said he found it best "to CIMP, or Code In My Pants". When I asked him exactly what he meant, he explained he found it best to work at home, coding at his own pace, dressed comfortably (in his pants), and communicating ...
The software development department of my company is facing with the problem that data migrations are considered as potentially dangerous, especially for my managers. The background is that our customers are using a large amount of data with poor quality. The reasons for this is only partially related to our software q...
I'm looking for some videos on these subjects: A movie/documentary detailing the origin, history, and current state of open source culture A movie/documentary on how open source software actually gets developed. What are the technical workflows. How do people create projects, recruit contributors, build a community, ...
I'm brushing up my CV/resume and trying to think of responsibilities and achievements from my past jobs and projects. It seems there aren't many, but probably there're some that I just don't identify as worth mentioning to a employer. What kind of responsibilities and achievements does your job include and which of the...
These days, I'm investing heavily in data structures and algorithms and trying to solve some programming puzzles. I'm trying to code and solve with Java and Clojure. Am I wasting my time? should I invest more in technologies and frameworks that I already know in order to gain deeper knowledge (the ins and the outs) and...
After a few months of learning about and playing with Lisp, both CL and a bit of Clojure, I'm still not seeing a compelling reason to write anything in it instead of C#. I would really like some compelling reasons, or for someone to point out that I'm missing something really big. The strengths of Lisp (per my researc...
So I've done lots of open-source work. I have released many projects, most of which have fallen under GPL, LGPL, or BSD licensing. Now I have a new project (an implementation library), and I can't find a license that meets my needs (although I believe one may exist, hence this question). This is the list of things I'm ...
I'm a hobby programmer. The absence of real world deadlines, customer feedback, or performance reviews leaves me free to daydream about having and implementing The Next Great Idea That Changes the World. Of course I'm aware I probably have a better chance of winning the lottery, but it's fun to imagine knocking out som...
I own the first edition of Expert F# by Don, et al. and I'm considering buying the next edition, Expert F# 2.0. But I'm wondering if it's worth it. Sure the syntax will be updated and all, but I'd be more interested if there were new topics covered or just compelling expanded coverage of the same topics otherwise. Glad...
Possible Duplicate: How Can I Know Whether I Am a Good Programmer? There are a number of questions here about recognising or considering someone as a good/bad programmer. These are all subjective. What I'd like to know is if there is a way to measure this. I realise there will and should be a subjective element to i...
I'm dealing, again, with a messy C++ application, tons of classes with confusing names, objects have pointers into each other and all over, longwinded Boost and STL data types, etc. (Pause and consider your favorite terror of messy legacy code. We probably have it.) The phrase "code rot" oft comes to mind when I wor...
The other half of this question: How do Programmers in the East see programmers in the West? The eastern part of the world (India/China/Philippines ) mainly provide outsourcing services to the western world (USA and Europe). Do you have the experience of working with offshore teams? If yes, how was it? Do you hold any...
I know of lots of software that is open-source. For at least some of it, someone, somewhere must have written the first version alone. How does good open-source software become well known? I'm most interested in the first steps. How does software written by one person gain its first new contributors? I'm looking for pr...
Basically, my knowledge on the issue is zilch other than the fact that open-source and closed-source exists. I'm a web developer (not a designer in the slightest), so I look online for things like icons. I've always been a big fan of these icons, which have a Creative Commons Attribution 2.5 License. As far as I can se...
Developing for smartphones in the way the industry is currently doing is relatively new. Of course, there has been enterprise-level mobile development for several decades. The platforms have changed, however. Think of: from stylus-input to touch-input (different screen res, different control layout etc.) new ways ...
Our team originally consisted of mostly server side developers with minimum expertise in Javascript. In ASP.NET we used to write a lot of UI logic in code-behind or more recently through controllers in MVC. A little while ago 2 high level client side developers joined our team. They can do in HTMl/CSS/Javascript pret...
The other half of this question: How do programmers in the West see programmers in the East? I think it's just as interesting and important to see how programmers in the east view programmers in the west. The eastern part of the world (India/China/Philippines ) is often seen as mainly providing outsourcing services to...
I'm considering outsourcing a part of our web application development project for freelancers, namely the site building part. What I mean by site building is the process of creating the xhtml/css template files, with dummy content, from a psd file (or any other graphical layout file). The resulting xhtml/css files will...
How do people deal with profanity in source code and VCS comments. Keep or delete? What about soft-expletives like WTF or Arrgggh? Is unprofessional, offensive or something to be shrugged off?
I'm working on a project with MVVM. Some ViewModels have more than one repository. Is ViewModels with more than one repository bad? Please provide with why it's good/bad.
I'm looking for a who's who list of projects(open source) that really illustrate the strength of the languages they are written in. Ideally the project should make use of some features of a given language that would otherwise be clunky or difficult to do in another language.
I feel that no one in the group I work in, myself included, really groks encryption and security, or the reasons behind making certain decisions. For example, we recently had a conversation regarding encryption of data that we handle for another group that we work with - the data ends up in a database that is on our se...
I took over a rather complicated project as the sole developer/project manager and tester sometime last year. In November last year there was a deadline for some new functionality to be delivered. The system I took over which was supposedly ready to be used was far from being ready. Sitting with one of the our custome...
I've been asked to create a web page from which users can access several other applications created using oracle forms and jsf, this will include also sso. I cant think of an easy way to do it, what I was thinking about was that the user should register and enter all his usernames/passwords for each application, after...
There are several different ways to connect to SQL Server from an ASP.NET application. I'm working on rebuilding an ASP.NET / SQL Server environment right now and I'm trying to figure out which method I should be going for. Here are the options as I see them: Connect via SQL Server ID that is stored in web.config. ...
I would love to create some database diagrams like this one with Visio but I can't find any templates at all for that kind of notation. The example I linked to was apparently made in Photoshop, which sounds like a terrible way to make ERDs. Are there any good Visio templates for this sort of thing? (I have Visio 2010 P...
I'm a front and backend .NET web developer (most solutions use MS SQL Server) and I won't be using any non-MS solutions for a while. Will Perl be useful for situations that require scripting in an MS product environment?
I am a front-end developer seeking to add programming to my skillset. As with all things, I'm sure that practice and practical application will aid me most, but I am currently having trouble wrapping my head around the transition from a very linear type of development (HMTL/CSS) to the more "3-dimensional" or non-linea...
Next Friday I'm giving a short (30 min.) talk to a bunch of software engineering students who will be attending the same university I did. Some context: The place is Montevideo, Uruguay The university is Universidad de la República (public, free university) The Software Engineering programme takes 5 years (if you're v...
What is the best practice for constructor parameter validation? Suppose a simple bit of C#: public class MyClass { public MyClass(string text) { if (String.IsNullOrEmpty(text)) throw new ArgumentException("Text cannot be empty"); // continue with normal construction } } Would i...
I have some code that is failing because of NullPointerException. A method is being called on the object where the object does not exist. However, this led me to think about the best way to fix this. Do I always code defensively for nulls so that I future proof code for null pointer exceptions, or should I fix the c...
LISP (and dialects such as Scheme, Common LISP and Clojure) haven't gained much industry support even though they are quite decent programming languages. (At the moment though it seems like they are gaining some traction). Now, this is not directly related to the question, which is would you use a LISP dialect for a pr...
I learned Prolog many years ago in University. During my professional life, I have never needed to use Prolog. Have I missed something special? As far as I remember Prolog requires completely different mindset comparing to prominent programming languages. Is Prolog really ever used to implement something professionally...
I have been a .NET developer now for about the past 5/6 years give or take. I have never done any professional Java development and the last time I really touched it was probably back in college. I have been toying with the Scala language a little bit but nothing serious. Recently, I've been offered an opportunity to d...
Whether you learned from a University, or mentor, or what have you (I'm mainly more concerned with University/Equivalent), what did the institution do right? And what do you think they could've improved upon when learning your programming skills? I'm curious how everyone felt their institution did as far as teaching th...
I have noticed a recent trend in requesting programmers who are rockstars. I get it, they're looking for someone who is really good at what they do. But why (pray) make the reference to a rockstar? Do these companies really want these traits as a real rockstar? Party all night and wake up to take care of quick busin...
I've just had quite a good phone interview (for a CakePHP-related position, not that it's especially important to the question). The interviewer seemed to be impressed with my resume and personality. At the end, though, he asked me to email him a code sample from my existing work project, "to check you're not secretl...
My team just tried to contact some guys from an old open source project hosted on code.google.com. We told them that we'd like to join their project and commit to it — at least to some branch of it — but no one responded to us. We tried everyone, owners and committers; no one was in any way active, and no one replied. ...
A javascript application release won't technically be closed source - at best it can be obfuscated. Given that, my question has two parts: Is it at all possible to release a technically open source application under a proprietary license? Are there any examples of applications which are technically open source, have ...
The company I work for maintains a successful SaaS product that grew "organically" over the years. We are planning to expand the line with a suite of new products that will share data with the existing product. To support this, we are looking to consolidate business logic into a single place: a web service layer. The W...
I am working on a Trading and Risk Management application and although from a C# background, I have been asked to work on SSIS packages. Now I can live with that. The pain point is that there is too much emphasis on business understanding. Trading (Energy Trading to be exact) is a HUGE area and understanding every litt...
I assume they weren't able to sit in front of a computer for the whole day like we do today. So how did they write their program? On a piece of paper and type it later when the computer is available? How did they do their testing?
Inspired by this question. I heard that some very very early versions of C compilers for personal computers (I guess it's around 1980) resided on two or three floppy disks and so in order to compile a program one had to first insert the disk with "first pass", run the "first pass", then change to the disk with "second ...
To summarize the following article: Why You're a Bad PHP Programmer you're a bad programmer if you don't write comments. My personal opinion is that code should be descriptive and mostly not require comments, unless the code cannot be self-descriptive. Consider an example given in the article: // Get the extensio...
Android and mobile development is an exciting area of development. As it is a new discipline, what would be expected of an android developer to build commercially robust applications in terms of skills ? The problem that I and, i think, many other "noobs" into the technology would like to know are the areas of technica...
Consider there is a manager and a programmer in a project. A manager crates a task which a programmer performs. In this situation who should check that a programmer didn't make some non-testable mistakes like using non thread-safe map in a singleton service? And who checks the overall project code structure?
A colleague and I were brainstorming about where to put the responsibility of an object to store itself on the disk in our own file format. There are basically two choices: object.store(file) fileformatWriter.store(object) The first one gives the responsibility of serialization on the disk to the object itself. This ...
I'm planning on making a simple discussion feature for a web framework I'm building. It should: allow anonymous posting block spam bots The obvious answer is to use a generic "captcha" plugin, however I think there are some creative opportunities here that I would like to explore, e.g. questions like: (simple math...
I know some of the basics of these technologies already, but it is mostly limited to more static sites. Using things like HTMl5 semantic elements, CSS3 gradients, shadows, @font-face etc. Is there a book out there that's the de-facto standard for describing best practices, design methodologies, and other helpful infor...
How do programmers in countries whose writing system is, say, right-to-left write their code? Say if they were using C# compiler, do they follow the left-to-right approach or do they have a different IDE that allows them write C# code right-to-left?
We are doing a cost benefit analysis on a migration project. It would be nice to be able to say that future changes will be x percent cheaper due to the migration. Does anyone have any experience or know of any study that shows what benefit we could expect?
Should programmers who build websites/web applications understand cryptography? I have no idea how most crypographic algorithms work, and I really don't understand the differences between md5/des/aes/etc. Have any of you found any need for an in-depth understanding of cryptography? I haven't needed it, but I wonder i...
I want to understand the linux kernel code, and I have been going through it but I am not able to get the full feel of what is happening(I am concentrating on network part of the linux kernel), so can anyone of you suggest good practices of reading C (or any other lang) code in general and specific to network part of t...
What languages (or classes (as in paradigms) of programming languages, plus a recommended language of that class) should every computer science student be taught in college according to you? Motivate your answers; why that language? What use will one have from it? What concepts does it teach (better than language X doe...
Just curious, what kinds of temptations in programming turned out to be really harmful in your projects? Like when you really feel the urge to do something and you believe it's going to benefit the project or else you just trick yourself into believing it is, and after a week you realize you haven't solved any real p...
So what really makes a program trivial? 'Unless its trivial software' is used so often in programming discussions. I find it very vague in the sense that I can't really figure if 'something is essential because its non-trivial software' or 'its non-trivial software because something has become very essential'. For exa...
While attempting to make a list programming subjects/topics that were unclear to me, I was unable to come up with anything. I know I can't be clear on everything. What steps can I take to get an accurate self-assessment of my knowledge and "know what I don't know"?
How can one sell an idea like "we should use jQuery because its highly optimized and cross browser compatible" or "entity framework is cool because its neat and takes care of our model automagically" when the common response is a blanketed statement such as "jquery doesn't perform well" or "entities bring in 12 columns...
I'm working on a web application where there will be many different users from all over the world making updates. I'm wondering what the best way to handle timezones would be? Ideally, as an event happens, all users view it using their local times. Should the server OS time be set to GMT, physical location time, or my ...
Recently I decided to add some translations to my program. I wonder how I should name the language files? in the culture's name of the language (example: english = en, french = fr, italian = it, etc...) in the name of the language [in english] (example: english = english, french = french, italian = italian, etc..) I ...
To start an open-source project is not just to throw up the source code on some public repository and then being happy with that. You should have technical (besides user) documentation, information on how to contribute etc. If creating a checklist over important things to do, what would you include on it?