instruction
stringlengths
34
36.1k
For instance, non-vertically aligned: Name: Hamt Version: 0.1.0 Cabal-Version: >= 1.2 License: BSD3 Author: Jason Baker Or vertically aligned: Name: Hamt Version: 0.1.0 Cabal-Version: >= 1.2 License: BSD3 Author: Jason Baker Which do you prefer and why?
we are about to start on a Web Development project (the planning starts early 2011). Do we choose HTML5/JS over Silverlight? Are there any applications which now run on HTML5? Samples? A simple Google Search led me here. Those look great (especially the Star Wars one!), but they are not what you call proper applicatio...
This question is a narrowing-down of these related questions: How much effort should we spend to programming for multiple cores? Concurrency: How do you approach the design and debug the implementation? Given that each user's computers may have different performance characteristics with respect to calculations, memor...
So I'm designing an Education Management System and I'm wondering if I should be creating the Use Cases or the Class Diagrams first?
Is registration login using email a better idea than username to identify the user?
It seems as though whenever I take an extended break from programming—whether to pursue other interests or simply because I fall out of the habit for a while—I invariably find that when I return to a project and set to coding, I come with an abundance of new ideas, novel approaches, and just plain better code. It may b...
Everybody knows, that PHP has problems with Unicode. Version 6 is effectively abandoned, because of Unicode implementation difficulties. But I wonder if anyone knows what are the exact reasons? Architecture/design problems, performance concerns, community problems (I bet not), something other?
I was trying to do some C++ coding that can send files from my laptop to my webmail account. It took me about 10 minutes to realize that there is no easy way to do this. Look into these links: GMAIL: http://code.google.com/apis/gmail/oauth/code.html YAHOO: http://developer.yahoo.com/mail/ I am trying to understand w...
I'm doing some research on the best GUI toolkit to use for future products at the company. We're talking about a fairly large organizations with quite a bit of code and a complete rewrite project in planning. Don't ask. Anyway, I'm trying to create a list relevant parameters to judge the toolkits. What would you use to...
I'm seeing that the open source solutions are growing rapidly & many companies use them now. What do you think the future for commercial products or solutions will be?
One of my professors says "the syntax is the UI of a programming language", languages like Ruby have great readability and it's growing, but we see a lot of programmers productive with C\C++, so as programmers does it really matter that the syntax should be acceptable? I would love to know your opinion on that. Disclai...
I want to obfuscate all the webpages of my website. I Googled through some free tools like HTML and Javascript obfuscation but don't know how effective they are. First of all, does it makes sense to obfuscate a webpage that could comprise of variety of codes like Javascript, PHP etc. Secondly, how effective is this met...
I see mostly everyone distinguishes between being a Software Engineer and being in IT on the jobs sections of their site. What are the definitions of each, and the distinction between them?
If I were to begin writing an application using Java with the intention of porting it to other platforms with little or no modification, would it be wise to consider using the .Net framework instead? I have no specific targets in mind with respect to platform. At a minimum, Windows/Mac/Linux support would be nice. Also...
I have a database design issue that I'm not quite sure how to approach, nor if the benefits out weigh the costs. I'm hoping some P.SE members can give some feedback on my suggested design, as well as any similar experiences they may have came across. As it goes, I am building an application that has large reporting dem...
I heard a while back that there used to be a compiler that attempted to fix syntax errors by analyzing context and inferring what was intended. Does such a compiler really exist? Obviously it has little practical value, but would be very interesting to play with and learn from.
Suppose that the original creators can't (or won't) enforce a license on their software/code, but that work is still popular. I guess if you want to visualize it, I'll throw out a convoluted hypothetical: Imagine a very small group of developers that released a code project under an open-source license. The repository ...
I have never read any of them but I find their style interesting and unique. I am not sure if they are worth giving money/time?
These days, so many languages are garbage collected. It is even available for C++ by third parties. But C++ has RAII and smart pointers. So what's the point of using garbage collection? Is it doing something extra? And in other languages like C#, if all the references are treated as smart pointers(keeping RAII aside), ...
Context Working as a freelance developer, I often made websites completely based on XSLT. In other words, on every request, an XML file is generated, containing everything we need to know about the page content: the name of the user currently logged in, the top menu entries, if this menu is dynamic/configurable, the te...
In legacy code I occasionally see classes that are nothing but wrappers for data. something like: class Bottle { int height; int diameter; Cap capType; getters/setters, maybe a constructor } My understanding of OO is that classes are structures for data and the methods of operating on that data. This seem...
I am using the MIT License for a particular piece of code. Now, this license has a big disclaimer in all-caps: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF... ... I've seen a normally capitalised disclaimer on the zlib license (notic...
I am working on a open source project in pure C, that I have started some time ago, but only recently found time to add some features. I can clearly some weaknesses of my old design, so I am trying to refactor my old code. I have no idea however, how to evaluate properly my new code. Do you know about any techniques or...
Recently, I've been switching between several projects and development environments. The expectations for coding style in each is different. Now, my question is three part, the first, just of curiosity: How did you define and find your coding style? How do you keep augmenting and improving it? How do you maintain it? ...
My question is more about how to architect an MVC application. For example, we are encouraged to use DI with the Repository pattern to decouple data access from the controller, however very little is said on HOW to do that specifically for MVC. Where would we place the Repository classes, for instance? They don't se...
My last job evaluation included just one weak point: timeliness. I'm already aware of some things I can do to improve this but what I'm looking for are some more. Does anyone have tips or advice on what they do to increase the speed of their output without sacrificing its quality? How do you estimate timelines and stic...
I’ve been programming C# professionally for a bit over 4 years now. For the past 4 years I’ve worked for a few small/medium companies ranging from “web/ads agencies”, small industry specific software shops to a small startup. I've been mainly doing "business apps" that involves using high-level programming languages (g...
Proponents of agile methodologies suggest approaches such as multi-stage contracts, target cost contracts, target schedule contracts, shared benefit contracts, and variable scope contracts. Are there other options available, and are there any case studies or informed discussions of these various approaches?
Agile does not encourage a lot of up-front design. This is good from a requirements management and software development standpoint, and allows the project to adapt to changing business needs. However, how does one do any long range planning of resources if you don't really know what you're going to build when you star...
About to embark on the initial phases of a project to rewrite a legacy application from the ground up (existing business rules will change somewhat, and be extended to incorporate a large number of new requirements that the existing infrastructure cannot handle). I am looking for items that are important to remember wh...
I'm currently working in a small company that its taking care of implementing lots of systems, most of them for goverment institutions, in witch it generally means taking software developted 20 years ago and refurbish them so fit up-to-date needs. The clients generally are very used to them and tend to discourage chang...
Some projects are available under restrictive FOSS licenses (GPL or AGPL, for example) which preclude them from being used in proprietary projects. The developers can then sell separate commercial licenses which allow the code to be used in proprietary projects. How common is this? Examples I'm aware of: MySQL x264 Cyg...
My friend said to me "IT is a specialization of Computer Science". I said it isn't. Is he correct? Can someone clarify the difference between IT and CS? I know they are related but according to me calling IT a specialization of CS doesn't make sense.
While reviewing a co-worker's code, I came across some spelling mistakes in function names and also grammatical errors like doesUserHasPermission() instead of doesUserHavePermission() in function and variable names. Should I point these out to him or am I being too pedantic by noticing these?
What is the difference between Hash and Dictionary? Coming from a scripting background, I feel that they are similar, but I wanted to find out the exact differences. Googling did not help me much.
I'll be trying to sell my Ruby on Rails development skills to small local businesses. It seems I'd be shooting myself in the foot if I couldn't manage to put their apps into production, in fact catering for this would be a selling point. However, I do not want to bill every client monthly for the cost of their hosting,...
Possible Duplicate: I don't know C. And why should I learn it? My goal is to be able to create online apps and dynamic, database driven websites. For instance, if in the future I get the idea for the next Digg or Facebook, I want to be able to code it myself. To arrive there I think I have basically two paths: Path ...
There are several rules I must keep asking programmers to follow very often. They write code and, if it works, job is just done, for them. Most basic rules might be: Commiting changes Not writing Model issues in View or Controllers Avoid hardcoding Can you tell me about your experience? How do you manage this?
How common are circular references? The less common they are, the fewer hard cases you have if you are writing in a language with only reference counting-GC. Are there any cases where it wouldn't work well to make one of the references a "weak" reference so that reference counting still works? It seems like you shoul...
A month or so ago I created my first LAMP stack and implemented a simple web site that exercised each letter in that acronym. However my development setup was much less than ideal. I don't really have a local test server, but instead I was writing all of my CGI scripts in vim while ssh'ed into the remote machine as r...
Background Info Hey, I pitched the idea of a company Hackathon that would donate our time to a charity to work on a project (for free) to improve morale in my company and increase developer cohesion. As it turns out most like the idea but, guess who's gonna be the one to put it together. lol Yeah me. I should add that...
For a long time Alan Cooper (in the 3 versions of his book "About Face") has been promoting a "unified file model" to, among other things, dispense with what he calls the most idiotic message box ever invented - the one the pops up when hit the close button on an app or form saying "Do you want to discard your changes?...
This is semi-hypothetical, and as I've no experience in dealing with massive database tables, I have no idea if this is horrible for some reason. On to the situation: Imagine a web based application - lets say accounting software - which has 20,000 clients and each client has 1000+ entries in a table. That's 20 million...
Why don't browsers have the ability to differentiate between events triggered via input devices and scripts ex: element.onEvent()? Wouldn't this be a very simple way counter attack web spam bots? Or am I way off on this?
There are, broadly, two types of FOSS licenses when it relates to commercial usage of the code - let's say the GPL-type and the BSD-type. The first is, broadly, restrictive about commercial usage (by usage I also mean modification and redistribution, as well as creating derived works, etc.) of the code under the licens...
Requirements: many different user experiences: website, mobile, etc. user management, registration, roles large amount of music metadata genome search that finds closest music public and private RESTful API for all functions massive server-side service scale
Greetings my fellow cubicle dwellers. I've found my role gradually change from "feature-maintainer" to "feature-developer". While much of the former would consist of fixing and/or updating an existing feature (and quietly grumbling about it's implementation with complete naiveté), in this new role I find: Have to comm...
I have forked a project and have changed lots of it. This fork isn't just a small feature change here and a buried bug fix there, its a pretty substantial change. Only most of the core code is shared. I forked this project at v2.5.0. For a while I've started versioning my fork at v3.0 . However I'm not sure if this i...
We are bootstrapping a new team of very small size (say 2-5) my question is: which type of version control works best for these kind of teams, either centralized or distributed.
What kind of non-technical training course do you suggest for a programmer? Example could be public speaking course, presentation skill, English, business writing, or anything not related to programming or software engineering itself.
Question posted anonymously for obvious reasons. I am working in a company with a dev group of 5-6 developers, and I am in a situation which I have a hard time dealing with. Every technical choice (language, framework, database, database scheme, configuration scheme, etc...) is decided by the CEO, often without much ra...
What questions would ask a candidate with mainly Java/.NET experience (10 years+) in an interview for a C++ position?
Are there any particular incidents which are responsible for the low reputation Microsoft (and Bill Gates) has in the eyes of the open source community? Microsoft is clearly not the only proprietary company. Companies like Apple have done a lot worse when it comes to restrictions on software. Why does Microsoft get mos...
I'm planning to integrate an external tool (ffmpeg in my particular case, but it could be anything, in fact, as lolng as its tasks are long running ones). This tool has a lot of command-line parameters. For now, I've done to simple things with it, already requiring me a good bunch of class writing, to embed all the inf...
What are best practices for managing and maintaining large Rails app?
I've looked at other anti-spam algorithms, notably Reddit's, but they seem to be inadequate and naive: for example, only banning specific words (like "spam") that appear in the title of a post. How can one approach this problem? Are there any tools that would help in this case, and for high-activity online community we...
we are using a classical V-shaped development process. We then have requirements, architecture, design, implementation, integration tests, system tests and acceptance. Testers are preparing test cases during the first phases of the project. The issue is that, due to resources issues (*), test phases are too long and ar...
I'm not talking just how memory is assigned and memory management (things that you can learn from C for example) but rather the hardware aspect and how each component of the computer hardware works internally and how they communicate with each other. How many of you know all of this?
A friend of my wife's is coming over for dinner tonight and he is a lot smarter than me. What do we have in common, well... A Bachelor's in Computer Science, and that should be enough of a conversation starter. But he's nearly completed his doctoral studies and is light years ahead of me in his particular area, whic...
I've been programming in C and C++ for some time, although I would say I'm far from being an expert. For some time, I've been using various strategies to develop my code such as unit tests, test driven design, code reviews and so on. When I wrote my first programs in BASIC, I typed in long blocks before finding they wo...
I may have to switch to Java for new project. I have very little knowledge about Java, because I've mainly studied and used C#, and I'm afraid of the differences between these two language/platform should likely to cause me many problems. Which are the pitfalls/gotchas I should care about?
When working in a team of developers, where everyone is making changes to local tables, and development tables, how do you keep all the changes in sync? A central log file where everyone keeps their sql changes? A wiki page to track alter table statements, individual .sql files that the devs can run to bring their lo...
I have been a software engineer / graphic designer for a few years and have recently been considering furthering my education in the field. (It was actually a very generous Christmas present) I would primarily be interested in something like Human Computer Interaction or a similar "creative technology" that involves he...
I've read lots of books for various programming languages, Java, Python, C, etc. I understand and know all of the basics of the languages and I understand algorithms and data structures. (Equivalent of say two years of computer science classes) BUT, I still can't figure how to write a program that does anything useful....
I was wondering what unique features I can learn from Scheme that would help me become a better programmer? I have a lot experience in mainstream languages, and I am looking to expand my horizons and learn about functional aspects that are missing from other languages. I am familiar with closures from javascript, la...
i want to publish my software under a opensource license with the following conditions: you are allowed to: Share — to copy, distribute and transmit the work use a modified version of the code in your application you are not allowed to: publish modified versions of the code use the code in anything commercial Is th...
So can an algorithm be patented? I saw this statement which made me think: Everybody would abstain from patenting the improvements of contour dot algorithm for at least several years, say up till 2021. So that the developers of the Outliner project feel free to implement their ideas. taken from this codeple...
I am not sure if this is even possible but I have watched a few videos with programming examples where it seems like the program is being written in some kind of command prompt rather than a nice graphical IDE. Im just curious as to what might be going on in these videos. Is it possible to write a program without an ID...
I cannot even figure out who made it - even the IMDB page is mostly blank, and Wikipedia does not seem to have any information about it. For such a useful film in CompSci, it strikes me as odd that the only meaningful Internet presence I can find are horrible quality copies or excerpts on YouTube. [Note: SO claims this...
I'm writing a program similar to Python's timeit module. The idea is to time a function by executing it anywhere from 10 to 100,000 times depending on how long it takes and then report results. I've read that the most important number is the minimum execution time because this is the number that best reflects how fast ...
In college, I was never interested in theory. I never read it. No matter how much I tried, I was unable to read stuff and not know what was actually happening practically. Like for example, in my course on automata theory, my professor told me everything possibly related to the mathematical aspect of it, but not even o...
I was going through some PHP functions and I could not help notice the following: <?php function foo(&$var) { } foo($a); // $a is "created" and assigned to null $b = array(); foo($b['b']); var_dump(array_key_exists('b', $b)); // bool(true) $c = new StdClass; foo($c->d); var_dump(property_exists($c, 'd')); // bool(tr...
I am beginner in developing test cases, and want to follow good patterns for developing test cases rather than following some person or company's specific ideas. Some people don't make test cases and just develop the way their senior have done in their projects. I am facing lot problems like object dependencies (when w...
I know this subject is a bit controversial and there are a lot of various articles/opinions floating around the internet. Unfortunatelly, most of them assume the person doesn't know what the difference between NULL and empty string is. So they tell stories about surprising results with joins/aggregates and generally do...
If you had a colleague who didn't understand the benefits of Separation of Concerns, or didn't understand it quite enough to apply consistently in their daily work, how would you explain it to them?
I have several iOS/iPhone apps that have been continually selling in small amounts in over 2 dozen different countries, even though the app UIs and all the store descriptions are only in English. In a few countries where English is not the official or native language, a few apps are selling far better than is proporti...
Sometimes I have a function that should return true or false. But sometimes three possible values would make more sense. In some language theses cases would be handled with integers or with exceptions. For exemple you want to handle the age of a user if he is over 18 years old. And you have a function like this. if(us...
When do the SOLID principles become YAGNI? As programmers we make trade-offs all the time, between complexity, maintainability, time to build and so forth. Amongst others, two of the smartest guidelines for making choices are in my mind the SOLID principles and YAGNI. If you don't need it; don't build it, and keep it c...
When working on a software project or a website, do you develop with localization in mind? By this I mean e.g. Externalizing all strings, including error messages. Not using images that contain text. Designing your UI with text expansion in mind. Using pseudo-translation to test your UI's early in the process. etc. ...
I need to make a sequence diagram and I'm not sure how to represent user input. Is it correct to have a message be sent from an object to the user asking for user input or should all objects be passive and only be operated by the user?
I was reading this and one sentence caught my eye (emphasis mine): So Ian Hickson, XHTML’s biggest critic, fathered HTML 5, an action-oriented toddler specification that won’t reach adulthood until 2022, although some of it can be used today. Is that true? Is that really the HTML 5 development cycle? Why is it taki...
Is this some kind of Murphy's law? Maybe if I want to hire a very good programming ninja I should check out his website as in "Show my your website and I will tell how good you are" EDIT: Go stackoverflow top users tab and you will see
I am planning to implement an official Java specification in a different programming language. Would this be a copyright violation? Hypothetical examples: a JMX "wrapper" library for C++ which can control a Java application over JMX, and uses similar concepts and class/method names as the Java implementation a JavaMai...
I'm reading Coders at Work, and in it there's a lot of talk about invariants. As far as I've understood it, an invariant is a condition which holds both before and after an expression. They're, among other things, useful in proving that loop is correct, if I remember my Logic course correctly. Is my description correct...
I'm reading The Daily WTF archives and especially those stories about IT-related companies which have a completely wrong approach of software development, the job of a developer, etc. Some stories are totally horrible: a company don't have a local network for security reasons, another one has a source control server wh...
I'm evaluating my current PHP practices in an effort to write more testable code. Generally speaking, I'm fishing for opinions on what types of actions belong in the constructor. Should I limit things to dependency injection? If I do have some data to populate, should that happen via a factory rather than as constructo...
I've been reading about concurrency, multi-threading, and how "the free lunch is over". But I've not yet had the possibility to use MT in my job. I'm thus looking for suggestions about what I could do to get some practice of CPU heavy MT through exercises or participation in some open-source projects. Thanks. Edit:...
I feel very comfortable with Imperative programming. I never have trouble expressing algorithmically what I want the computer to do once I figured out what is it that I want it to do. But when it comes to languages like SQL or I often get stuck because my head is too used to Imperative programming. For example, suppos...
I have many friends that see what I do, find it interesting and ask me the question Do you think I could be a programmer? My response is ... ummm ... do you like math? I'd like to have a helpful response, so I didn't know if anyone knew of a fairly decent aptitude test for someone that would be starting from squ...
I started to work at a company as an engineer a couple of months ago. It's a small company and what they basically do is answering service on phones. Now they are switching from normal phones to IP phones so that computers take more important place in the work. However, all the computers used by workers are equipped wi...
Should I write APIs in US spelling or British spelling? Or should I provide with mapping both of them to a single one and internally using anyone which I like so that both of them works ? At present most of the APIs are with US spelling. What is the solution for it? edit: Is there a way to standardize this. May be su...
When ever I am stuck with a particular problem, I search for a solution in Google. And then I try to understand the code and tweak it according to my requirement. For example recently I had asked a question Reading xml document in firefox in stack overflow. Soufiane Hassou gave me a link to w3schools, where I found a e...
There is plenty of material about designing software for object oriented programming. Do you know of any good materials for pure structural programming? I am working purely in C and while I can use some experiences from object oriented programming I found out, that I know few tricks about good structural design.
As engineers, we all "design" artifacts (buildings, programs, circuits, molecules...). That's an activity (design-the-verb) that produces some kind of result (design-the-noun). I think we all agree that design-the-noun is a different entity than the artifact itself. A key activity in the software business (indeed, in a...
I seem to remember that I was reading that underflow means you have a too small magnitude that cannot be presented anymore in a type overflow means you have a too large magnitude that cannot be presented anymore in a type However, in practice I perceive that the terms are used such that underflow means you have a to...
I want to build a web app that uses Salesforce.com data, and I want to build it fast. I'm a .NET developer (WPF, C#, ASP.NET MVC). I understand Ruby and RoR fairly well, but I haven't delivered any Rails apps. I'm wondering, is Ruby on Rails a suitable tool for rapidly building Salesforce apps, or is it better for the ...
I've been working on a my first real project using PyQt lately. I've done just a little bit of work in Qt for C++ but nothing more than just messing around. I've found that the Qt python bindings are essentially just a straight port of C++ classes into python, which makes sense. The issue is that this creates a lot of ...
Data validation, whether it be domain object, form, or any other type of input validation, could theoretically be part of any development effort, no matter its size or complexity. I sometimes find myself writing informational or error messages that might seem harsh or demanding to unsuspecting users, and frankly I feel...
People have to eat, even developers of 'free as in beer' software. So I wonder, what are some of the common revenue models that are used by such companies when they aren't directly selling the software? I know one or two (advertising and support contracts) but are there more? As Walter noted, if you know what the pros/...
As a programmer, I find myself in the dilemma where I want make my program as abstract and as general as possible. Doing so usually would allow me to reuse my code and have a more general solution for a problem that might (or might not) come up again. Then this voice in my head says, just solve the problem dummy its t...