instruction
stringlengths
34
36.1k
why not combine the best features of the all existent programming languages and fit it in a universal programming language?
What are the key differences between software engineers and programmers?
I'm currently using Planning Poker to do our detailed estimates. This works great but relies upon a fairly detailed work breakdown. Often it takes 6-8 weeks to get a sufficiently detailed design and work breakdown. I've found the 6-8 weeks of analysis are often wasted as the estimate comes out so high it doesn't make e...
I'd like to know at what point can be considerated an AI implementation? I means, what is the minimal requeriment for that? Can you give a simple code example?
What are the preferred use cases for the following sets of terms: Log in / Log out Log on / Log off Sign in / Sign out Sign on / Sign off From what I can guess, "Logging in" should be used for a long-lived session (like a website), whereas "Sign in" should be for something that you will be attending to (like IM or a ...
I'm freelancing on a project where I'm the only programmer, and find myself at the end of a line of four middlemen, who stand between me and the actual customer, each passing my work as internal to their own company. Communication is terrible and the requirements, made by an advertising company, are flimsy. I've manage...
Let me explain this a little. In a previous job, I had a coworker that has a good reputation with the management. He always finished on time. And the bosses were happy with his progress so het got certain privileges. The problem was that the other programmers knew his secret. He has optimized the 80/20 rule, so he work...
Suppose I develop a useful library and decide to publish it as open source. Some time later I have a business need to do something that wouldn't comply with the open source licence. Am I allowed to do that? How should I publish the software in a way that I keep ownership and don't block myself from using the library in...
I tend to understand things rather quickly, but after 2 years of programming in Python I still stumble across things (like Flask today) that amaze me. I look at the code, have no idea what's going on, and then feel very humbled. I feel like an absolute expert each time this happens, up until the moment it happens. Then...
I've only been a year in the industry and I've had some problems making estimates for specific tasks. Before you close this, yes, I've already read this: How to respond when you are asked for an estimate? and that's about the same problem I'm having. But I'm looking for a more specific gauge of experiences, something q...
So you take a contract where you have solid experience with 75% of the technology necessary. How do you handle your time to learn the other 25%? Work it into the billing time? Expose the 25% in the contract as 'research'? Do the learning on my own time (not billed)? Not take the contract (too large of an unknown fo...
I've had a couple of times in the time I've working, moments when I get an error ocurring in just 1 computer and it often takes me hours or days to figure out because it is (or at least seems) an isolated incident as it is not being presented in any other instance of whatever I'm checking. How do you guys deal with thi...
When you are setting up your system landscape for large and/or multiple application deployments, do you consider mainframe? If not, why not? If so, what factors are you considering. If you take a real TCO look at large ERP and/or consolidated application landscapes, mainframe is actually quite cost-effective. My own ...
Being a programmer is not a very healthy profession - long hours of sitting in front of a computer, with impending deadlines just over the cubicle. This takes a toll on the body and mind. So what tips do you have for programmers in order to stay healthy?
When I get a new laptop, it usually takes me about two weeks to reinstall all my developer programs, utilities and tweak the O/S settings to how I like them. I know there are utilities out there to backup/restore systems, but this is usually if it is on the same hardware. What would you recommend?
Frequently, I have been finding myself overloaded with contracts. Most of the time, I find myself juggling with at least 2 projects, in addition to the numerous websites I have to upkeep and perform maintenance on. Unfortunately, many of my clients will expect updates constantly - are constantly adding more to the to...
Other than being annoyed at whitespace as syntax, I'm not a hater, I just don't get the fascination with Python. I appreciate the poetry of Perl, and have programmed beautiful web services in bash & korn, and shebang gnuplot. I write documents in troff and don't mind REXX. Didn't find tcl any more useful years ago, b...
I've enjoyed a number of (fiction/non-fiction books) about hacker culture and running a software business in the 80's, 90's. For some reason things seemed so much more exciting back then. Examples are: Microserfs (Douglas Coupland) Accidental Empires (Robert X. Cringely Almost Pefect (W.E. Peterson, online!) Coders at...
Sometimes I can't stand it when project managers ask me to estimate time to complete for various tasks. An estimate is a guess, and guesses can be wrong. Generally, bad requirements and documentation will lead to bad guesses. So I often wonder if the project managers were ever in my shoes trying to guess at how long ...
I was reading the wikipedia article on programming style and noticed something in an argument against vertically aligned code: Reliance on mono-spaced font; tabular formatting assumes that the editor uses a fixed-width font. Most modern code editors support proportional fonts, and the programmer may prefer t...
At my first workplace we were using Digital Standard MUMPS on a PDP 11-clone (TPA 440), then we've switched to Micronetics Standard MUMPS running on a Hewlett-Packard machine, HP-UX 9, around early 90's. Is still MUMPS alive? Are there anyone using it? If yes, please write some words about it: are you using it in chara...
We're developing a new project that is to be deployed on a large number of client sites. The project contains a web-based GUI as one of it's "access points". Speed of the web interface is a priority for this project, second only to security. In the past, we've always created "web sites" in Visual Studio, which, when pu...
In the past I have worked with designers, BAs and project managers, all who regularly produce project artifacts, yet very really do they understand the concept of versioning. When I try to explain it to them (even in its most simple form of multiple differently named files) they seem to have some kind of mental block....
I define defect as : "something within the application design or code which prevents it functioning as per requirements." I'm looking for ideas about the causes of defects, eg the human factor, lack of testing, lack of prototyping, and possible ideas to mitigate these.
How should code in version control be stored? Developer friendly? so that programmer can quickly take the latest and able to run from his editor without doing many changes? (like config files pointing to dev DB..etc) or Should it be production friendly? source should be in a manner which is easy to deploy on producti...
It's all the rage nowadays. "Everyone" recommends it. That in and of itself makes me suspicious. What are some disadvantages you have found when doing test-first (test-driven) development? I'm looking for personal experiences from knowledgeable practitioners--I can read the hypothetical musings of a hundred wannabes el...
Need a Free, Fast(development and runtime) and Reliable(transactions and locking) tool set for creating an enterprise application for SMBs. I'm thinking of an application framework + UI framework + DB which will help me in developing the software faster. As it is known, business softwares need lot of similar UIs to be...
I've been doing design and programming for about as long as I can remember. If there's a programming problem, I can figure it out. (Though admittedly Stack Overflow has allowed me to skip the figuring out and get straight to the doing in many instances.) I've made games, esoteric programming languages, and widgets and ...
With all of the frameworks available these days, ORMs, dependency injection (DI), Inversion of control (IoC), etc., I find that many programmers are losing or don't have the problem solving skills needed to solve difficult issues. Many times, I've seen unexpected behaviour creep into applications and the developers una...
I've used Emacs quite a bit, and I'm comfortable with the most basic commands/shortcuts, but I know Emacs has a lot more to offer than what I'm using. What are some of the lesser known features of emacs that can help me become a more productive programmer?
Especially when writing 'standard' (non-HPC) applications, do you consider what sorting algorithm to pick, or just settle with quicksort (which is what most libraries just call sort)? To some extent it may be profitable in specific situations, but on the other hand proper optimization requires some time to analyse the ...
I'm not talking about a diff tool. I'm really looking to see if a project contains code that may have been "refactored" from another project. It would be likely that function names, variable names and whatnot would be changed. Conditionals might be reversed, etc.
I work as the back-end developer, front-end developer, systems admin, help desk and all-around 'guy who knows computers' at a small marketing company of about 15 people. I was wondering if others could share their experiences flying solo at companies that aren't necessarily inclined toward the technology industry. I ...
I have found that there are only 3 ways to unit test (mock/stub) dependencies that are static in C#.NET: Moles TypeMock JustMock Given that two of these are not free and one has not hit release 1.0, mocking static stuff is not too easy. Does that make static methods and such "evil" (in the unit testing sense)? And i...
In another question, it was revealed that one of the pains with TDD is keeping the testing suite in sync with the codebase during and after refactoring. Now, I'm a big fan of refactoring. I'm not going to give it up to do TDD. But I've also experienced the problems of tests written in such a way that minor refactoring ...
Someone once said we should prefix all our methods with the /// <summary> comment blocks (C#) but did not explain why. I started to use them and found they annoyed me quite a bit, so stopped using them except for libraries and static methods. They're bulky and I'm always forgetting to update them. Is there any good r...
A well-tested codebase has a number of benefits, but testing certain aspects of the system results in a codebase that is resistant to some types of change. An example is testing for specific output--e.g., text or HTML. Tests are often (naively?) written to expect a particular block of text as output for some input para...
This has nothing to do with having a favourite editor or anything like that. I was just wondering, per language, what are the most popular Integrated Development Environments? Maybe a top 2-3 if there is some contention. (Perceived popularity is enough) Thus Far: C# - Visual Studio, SharpDevelop Java - Eclipse, NetBean...
To the outside world, programmers, computer scientists, software engineers, and developers may all seem alike, but that's far from the case for the people who create software for a living. Any single programmer's ability and knowledge can range very widely, as well as their tools (OS, language, and yes, preferred edit...
A lot of us started seeing this phenomenon with jQuery about a year ago when people started asking how to do absolutely insane things like retrieve the query string with jQuery. The difference between the library (jQuery) and the language (JavaScript) is apparently lost on many programmers, and results in a lot of ina...
I offered to do a little bit training in F# at my company and they seemed to show some interest. They are generally VB6 and C# programmers who don't follow programming with too much passion. That being said I feel like it is easier to write correct code when you think in a functional matter so they should definitely ge...
Some projects we run internally using are Scrum, while still being "fixed everything" to the customer. We're experiencing mixed success on our part (the customer likes the visibility of the burndown chart). Can the types of projects we work be successfully executed using the agile methods?
There are some really common usability errors in everyday software we used; errors that result from the ways the particular programmer has learned without learning of all the other ways there are. For example, talking about Windows software in particular, the following common flaws come to mind: Failure to support mul...
I've recently been frequented by erroneous error messages from mod_security. Its filter sets cover outdated PHP exploits, and I have to rewrite my stuff because Wordpress&Co had bugs years ago. Does this happen to anyone else? Apache mod_security blocks possibly dangerous HTTP requests before they reach applicat...
To quote Arthur C. Clarke: Any sufficiently advanced technology is indistinguishable from magic. Used to be I looked on technology with wonder and amazement. I wanted to take it apart, understand how it worked, figure it all out. Technology was magical. I'm older, I know more and I spend my days creating stuff that, ...
I am planning to create a utility, which will query the database and store some information (on another table in the database). Its a multi-threaded utility and require to run for every 5 or 10 minutes/later may be thrice in a day. I see two options to achieve this in C#/DotNet programming. creating windows service h...
Most software developers want to keep application logic in the application layer, and it probably feels natural for us to keep it here. Database developers seem to want to put application logic in the database layer, as triggers and stored procedures. Personally I would prefer to keep as much as possible in the applica...
Joel Spolsky said in one of his famous posts: The single worst strategic mistake that any software company can make: rewrite the code from scratch. Chad Fowler wrote: You’ve seen the videos, the weblog posts and the hype, and you’ve decided you’re going to re-implement your product in Rails (or Java, or ....
Just read the question about the Big Rewrites and I remembered a question that I've been wanting answered myself. I have a horrible project passed down to me, written in old Java, using Struts 1.0, tables with inconsistent relationships, or no relationships at all and even tables without primary keys or fields meant to...
When drafting a project proposal, do you use any standard template? What features/information should be included? What is nice to have included? What sort of boiler plate information should I shove in? Do you find any design pattern or concept particularly helpful?
What tools and techniques do you use for exploring and learning an unknown code base? I am thinking of tools like grep, ctags, unit-tests, functional test, class-diagram generators, call graphs, code metrics like sloccount, and so on. I'd be interested in your experiences, the helpers you used or wrote yourself and th...
It's not uncommon for projects to fail. As a programmer, how do you deal with projects that fail? Some definitions of failure: Misses deadline. Code and functionality does not do what it's supposed to. Software becomes vapor-ware or endless number of phases, essentially undeliverable. Or maybe you have your own defin...
Assuming the language provides it, what are some things to do or libraries to use that every programmer should know? My list would be Regular Expressions Named Pipes standard IO (std in/out/error) Executing outside executables (like imagemagik and your own scripts) How to grab an HTTP page as a string (mostly for upda...
Lately I've been experimenting with using a collaborative text editor (or plugin such as NppNetNote for Notepad++) for two or more partners to edit source code. I've been met with unexpected success, and the workflow differs from anything I've ever experienced. My findings: It's fun to fight over code, but also very s...
What is a recommended setup in terms of source control, builds, testing, bug tracking, and deployment for a downloadable PHP application (a la Wordpress, phpBB, Magento, etc.)? As a developer working on the application, what would you expect? What about as a user of the application? Please describe a setup and workflow...
Prevalence is a simple technique to provide ACID properties to an in-memory object model based on binary serialization and write-ahead logging. It works like this: Start with a snapshot. Serialize the object model and write it to a file. Create a journal file. For every call into the object model, serialize the cal...
I'm starting to use the ORM recommended by the framework I choose, and though I like the idea of the added layer of abstraction the ORM provides, I'm starting to realize what this really means. It means I'm no longer working with my database (mysql) and any mysql-specific features are gone, out the window, like they do...
Recently reading the question What languages do you use without an IDE? One question asked in a few answers was "is Notepad++ and IDE?" One answers to the original question said "None, I use vim...", implying that vim is an IDE. But then another answer suggested vim isn't an IDE. So where is the line? What about notepa...
I'm trying to understand how I should evaluate writing a book, article, or conference presentation. Writing a book is a lot of work. Same for writing an article in a magazine or presenting in a conference. They need time and you may even make a mistake here and there that back fires (bad reviews, people calling you an ...
As part of being a programmer, you often are asked to provide estimates/ make slideware / do technical demos for Sales teams to present to end-clients. Sometimes we go along for the 'technical' discussions or 'strategic capability planning' or some similar mumbo-jumbo. Sometimes, you kind of know which ones are totally...
I always had this question in mind but couldn't find a proper place to ask. There are some really nice and great open source free software available on the net. How do these products sustain themselves financially? It is one thing writing a small utility which does something nice but writing a complicated product with ...
I've been on the constant road of learning new concepts in OOP, Software Design, Architecture, etc. But there are times when you are in a team where those concepts are foreign to them and they don't have the time or the same eagerness to learn as you. The problem is if you design your code the "right" way, the people w...
The class diagram is modeled on the system requirements, and it is important to create solutions based on those requirements. If I have said class diagram should I strictly adhere to it? What about refactoring? What if the diagram did not provide some design principle that I feel were left out?
The way I see it if you create one before you get the advantage of: Planning ahead Overview of the project but you lose: Time (doing work you'll probably end up repeating when writing code) On the other hand, I could just create them all after writing my code just to keep it as a reference for future developers. Wh...
Here is a theoretical problem. It could apply to many systems. Let's assume RESTful Web services for example. You want to find out something but as it happens you can't get it in a single query. You can make multiple queries. For example, you have a joint bank account (or a company bank account) and you want to fi...
As I advance in my career, I have found that I do less technical work and more project management work. I joke that I am getting dumber every day. Each time I go back to doing technical work it seems to be a little harder to get things going. What suggestions do people have for maintaining technical expertise throug...
This includes architecture decisions, platform choices or any situation where a such a bad choice led to negative consequences.
Both in Code Complete by Steve McConnell and The Pragmatic Programmer by Andrew Hunt & David Thomas, they allege that most programmers don't read programming-related books as a habit, or at least not often enough. Does this still hold? Are programmers who do read such books still rare? I must admit that only quite rece...
Modern IDEs have a lot of tricks up their sleeves to help with code writing, refactoring, searching. All those are very helpful, but rarely any of them looks like a real "magic" and makes me think "Wow! How did it figure that out?" Can you name any impressive IDE code automation (or other) features that blew your mind...
I'm sure that many of you have encountered a bad client. I'm also sure you took some measures to prevent such encounters in the future. What is the most influential characteristic of a client that warns you to walk away?
I've used TestNG and JUnit. What other frameworks are out there? What makes them special and/or different from the rest?
I've got an itch and it needs to be scratched. I've got nothing to program these days. Normally I'd just pick my flavour of the month technology and fiddle with it, but I want to make something and take a break from serious research/experimentation for a while and just write something for fun (ie. not necessarily purel...
What's the worst programming-related or technical book you've ever read? This can be any book which one way or another can be connected to programming, as long as it's not fiction.
Processors are getting more and more cores these days, which leaves me wondering... Should we, programmers, adapt to this behaviour and spent more effort on programming for multiple cores? To what extent should we do and optimize this? Thread? Affinity? Hardware optimizations? Something else?
What different types of security do there exist? Why and when should they be implemented? Example: SQL Injection Prevention
I'm using VS 2010 since we're developing an app in .Net 4 and the performance is driving me crazy. It's mostly bad when I don't view the IDE for a while (such as when I get pulled away for a help desk call or come in in the morning). I realize it's probably built in WPF which unloads its resources when unused, but the...
Which design pattern do you think is the most popular?
How should I be keeping track of a php script's versions/changes when it pertains to a single script in one file? Should I have a separate changelog, and if so (1) what should it be named, (2) how should the contents of the log be formatted, and (3) how should the log be associated with the php script/file? Or, should ...
Note: this question is an edited excerpt from a blog posting I wrote a few months ago. After placing a link to the blog in a comment on Programmers.SE someone requested that I post a question here so that they could answer it. This posting is my most popular, as people seem to type "I don't get object-oriented progra...
I was wondering if there was a standard for laying out a class's regions. I currently use Fields Constructor Properties Public Methods Private Methods Fields being Private Properties and Properties being the public ones. I'll normally use subregions within that if needed, or will occasionally add other regions below ...
Thoughts on these? Python is one example, and no this is not a stab against Python I like the language. What languages have a indentation requirement?
I have been using mysql for the same amount of time I have been using PHP. However I feel about 10x more confident in PHP; or any other programming language. But I just can't seem to really really grasp SQL. I mean, I can select, update, insert, delete, join, etc. but when it comes to more complex stuff I am lost. How ...
Most programmers defending methodologies politically correct like Agile, Waterfall, RUP, etc. Some of them follow the methodology but not all of them. Frankly, if you can choose the methodology, you certainly would go to mainstream "correct" methodologies or you would prefer the "easier" methodology like cowboy program...
While the basic scenarios are white on black and black on white, most programmers find more varied syntax highlighting useful. What advantages do you find from a general setup? (E.g. "a dark background allows...") What specific tweaks do you find most helpful? (E.g. "slightly off-white works to...", or "highlighting ...
Who here is learning Go? Are other companies looking at using it? Is it likely to become widely used?
I had a question posed to me the other day by another programmer. I remember (a very long time ago) wondering the very same. Why was a browser-side include tag never considered? Or was it? Specifically with a tag that instructed the browser to include additional HTML from other sources. e.g. <include src="http://ser...
What is your favorite method to declare a pointer? int* i; or int *i; or int * i; or int*i; Please explain why. see also: http://www.stroustrup.com/bs_faq2.html#whitespace
A typical curly brace programming lang has two types of AND and OR: logical and bitwise. && and || for logical ops and & and | for bitwise ops. Logical ops are more commonly used than bitwise ops, why logical ops are longer to type? Do you think they should be switched?
I'm talking about the way we write simple routines in order to improve performance without making your code harder to read... for instance, this is the typical for we learned: for(int i = 0; i < collection.length(); i++ ){ // stuff here } But, I usually do this when a foreach is not applicable: for(int i = 0, j = c...
As a general purpose programmer, what should you learn first and what should you learn later on? Here are some skills I wonder about... SQL Regular Expressions Multi-threading / Concurrency Functional Programming Graphics The mastery of your mother programming language's syntax/semantics/featureset The mas...
This question is something that's been bugging me for the past 3 months since I switched from being a freelancer to working at a Web Design firm. Our sales people often ask us something similar to the following series of questions: How much does it cost to program a widget How many hours will it take to convert this w...
If you were hiring programmers, and could choose between one of (say) the top 100 coders on topcoder.com, or one of the top 100 on stackoverflow.com, which would you choose? At least to me, it would appear that topcoder.com gives a more objective evaluation of pure ability to solve problems and write code. At the same ...
I mean, I still have a MSX2 with a Z80 processor and if you look at any Konami's game made for that computer in its time (roughly between '84 and '90) is amazing the high quality code of those games. I was a kid at the time, trying to learn how to program a computer and still today fascinated me how well made they are,...
Linguistic relativity is the idea that language shapes the way we think. My question is, how much, and to what extent, does this apply to programming? Are some native, natural languages better-suited for thinking about programming than others? For instance, can the following be stated more concisely in a non-English...
Let's say a large corporation is planning to replace it's existing version control system. Let's say it is only considering systems from major vendors that cost hundreds of thousands of dollars because they have "support." Does version control in an enterprisey environment have to be expensive? Does your medium/large...
As per this question: I decided to implement the BitTorrent spec to make my own client/tracker. Now, I was going through the spec, I was about 70% done implementing the BEncoding when I found a link to an implementation of BEncoding in C# written by someone else. Normally, if I were working on production code, I'd use ...
I have the "user's side" of the story, I think they want it better if it's on Spanish. But, what about the programmers? Do you make your programs multi-language? Why? Why not? Who translate your software? Are you ok with paying somebody to translate your app or you prefer doing it yourselves? Is the benefit bigger tha...
I've been handed the ER diagram for a quite complex database. Complex to me at least, 849 tables. One of the architects says to understand the code, you need to understand the database and relationships. Now I am basically a Java programmer hence not too familiar with this How do I start? Should I start from something...
There are many stories about intentionally bad code, not only on TheDailyWTF but also on SO. Typical cases include: Having a useless time-wasting construct (e.g. an empty loop counting to some huge value) so programmers can easily "speed up" the application by removing it when they are tasked to. Providing intentional...
Possible Duplicate: int* i; or int *i; or int * i; Thinking about where we place our asterisks; how do those that prefer to keep the "pointerness" away from the type and with the identifier (int *i) write code when the identifier is missing? void f(int*); // 1 void f(int *); // 2 The former seems much more common, ...