instruction
stringlengths
34
36.1k
I was browsing through the Amazon.com Bookstore and I came across the book "Functional Programming for Java Developers". I know some very basic Functional Programming and have been programming in Java for 3 years. I would like to know is Functional Programming even possible in Java?
Given C++ gained lambdas with C++11, will there be any LINQ like higher order function library officially supported later? Or is there already such a library used in production quality code? Obviously I'm not expecting the SQL-like expression tree based LINQ query syntax in C++. I am talking about the lambda based one....
I have 10,000 addresses from a city, which all have a region field in the database. When a new address is entered, then I want my software to automatically detect the region of the address . I think it should be implemented with some sort of machine learning algorithm. How can I do this? And with every newly inserted a...
In a similar vein as the How can open source projects be successful without documentation about their design or architecture? question, I'm curious: Why are so many libraries so lacking in end user documentation? My view is this: Most everyone agrees that reading source code is more difficult than writing source code...
I'm a newly graduate programmer and just got hired before my graduation. In the office, I used to create and revise modules of some applications developed by other programmers in our company. The problems I encountered with their applications are: Unnormalized database at it's best, they've broken all the rules of dat...
We have modularized our API into some independent components. Independent meaning these can be built via Maven and used as dependencies for other projects such as webapps. Now, to use this API, there needs to be an intermediate processing class which does a translation of the client data model into the callee (compone...
I'm a web developer working in a team of three developers and one designer. It's now about five months that we've implemented the agile scrum software development methodology. But I have a weird feeling I just wanted to share in this site. One important factor in human life is decision-making process. However, there is...
Hello and I'm apologizing in advance if this question doesn't fit programmers section of stackexchange. I'll try to clarify what the problem is by telling a story where the problem originates from. I'm working in a small company (8 people) where we have developers, sys admins and staff that handles day to day calls. Th...
I've wanted to learn C++ for awhile and took AP Computer Programming in High School (back when it was C++ and not Java). I enjoy C and just haven't found the time to learn C++ or I'll just fall back on C# where I'm much more productive. My question is this: given that C++ '11 has been approved (although I know not ful...
Do you know if the size of the database (number of tables used) is a factor when choosing between Hibernate and JDBC? Why or why not? In my particular case, I am evaluating Hibernate and JDBC for interacting with Oracle database for a small web app.
Are there any risks in giving out distribution certification/private key/provisioning profile to a freelancer? The freelancer needs to build the binary for me to submit (I am okay with this because I don't own the source code of the app), I just want to know if there is any risk involved in sending the distribution cer...
I am finishing my project and in my thesis I am explaining why I used an MVC pattern to build my website, and have stated the advantages of designing it this way. However, if I had not used MVC and had built my website from scratch with all the functions for data, processing, and display into each page, what would that...
I am completely new to Android development and have been reading many articles on the Android site and elsewhere. There are a lot of articles that give very specific examples, but I haven’t bumped into the articles explaining the following: Logging-In: I haven’t noticed market applications forcing me to create login c...
Possible Duplicate: Data input validation - Where? How much? Given that I have a web application with a user facing form that will store information in a database (that will be used by other applications as well), it seems to me to be worthwhile to validate 3 times: On the web client side via javascript to save po...
I've noticed posts on here demonstrating the use of delegates\lambda functions to solve the hole in the middle idea without a lot of repetition: http://www.markhneedham.com/blog/2009/04/04/functional-c-the-hole-in-the-middle-pattern/ The problem seems to be that junior developers and others don't necessarily understand...
So, what would I need to write "Hello world" on the iPod Touch on boot? Make that the entire operating system? Which compiler would I use, how would the graphics be done...? Can this be done without too much effort? I know writing an Assembly boot loader isn't that hard...
Including customizable, JavaScript-based scrollbars (and scrolling functionality in general, i.e. bind the control to the mouse scroll wheel) in your webapp can be a great temptation. However all solutions I could find were developed by individuals (which can equal lack of formal or future support). In addition I fail ...
I have been working on a new project. The project works like this: The end user can access a webapp using a link and he can add multiple systems on his network and manage that particular systems details. My part involves the front end and the webserver, which is done in python. My python actually communicates with anot...
If this title is ambiguous, feel free to change it, I don't know how to put this in a one-liner. Example: Let's assume you have a html template which contains some custom tags, like <text_field />. We now create a page based on a template containing more of those custom tags. When a user wants to edit the page, he sees...
One issue I think I am going to run into with my integration testing is having multiple tests accessing the same database. While this is not a problem now, I know we have multiple applications here that access the same database and I am just trying to think of a way to prevent this issue before it happens. An idea I h...
Alan kay in his paper, The power of Context pdf link, page 8, enumerates some of his motivations for dynamic objects. Some of the influences like Paper on lisp, early paper on the design of functional computers, Moleculer biology of the gene (he envisioned objects as biological cells) are somewhat clear and I see the p...
I have read up on quite a few of these questions asked on here regarding "how much should I charge for..." such as: How should I charge for programming things which take two minutes to fix? https://softwareengineering.stackexchange.com/questions/52954/how-much-should-i-charge-for-a-web-app https://softwareengineering.s...
My company has created a modular PHP framework over the years, beginning long before PHP 5.3 added namespaces. Recently, we decided to start using namespaces in our library's new code, and we intend to namespace old code eventually. However, we have a few issues we are trying to work out to determine if adding namespac...
So, why do websites have to ask (spoken) language and country when the browser can tell them that? Edit: Specifically, I mean why not use the accept-language section in the http header, set by the language settings in the browser, not based on the IP address. This question focuses the websites that put up a wall, forc...
I have been working on content management systems for about 7 years. 2 years ago created my own. Currently building a newew, better and bigger version. However, fell into dilemma. I have a core file, that gets included to all pages. Core file makes sure of adding functions, config, mysql connection etc. I also have add...
in "Notes on Programming in C", in section "Complexity", Rob Pike writes: Most programs are too complicated - that is, more complex than they need to be to solve their problems efficiently. Why? Mostly it's because of bad design, but I will skip that issue here because it's a big one. .../... Does anyone know ...
In the case of a newly designed functional language, consider e.g. the not equals operator, spelled /= as is common among functional languages. Of course this operator is also known as != in C family languages, and <> in SQL et al. It would be easy to make the parser accept these as synonyms, in the hope of cutting dow...
I've always felt lucky to work in a small programming team. I think the most I've worked with is 11 programmers. What is it like working on a project with hundreds of developers? Thousands? What does scale and what doesn't? EDIT: Thanks for all the responses! There seem to be very few positives: possible to work on...
Is creating a scripting language for my own personal learning experience worth it? The reason I ask is that there are so many programming languages available already, I know mine will never have any actual use other than providing a good learning experience. I do, however, see drawbacks with just trying to make a scri...
I've been programming for a few years and I began in Java, and in my time I've found many different sources claiming Java to be an inferior language in some way or another. I'm well aware that each language has it's strengths and weaknesses, but a lot of things I've read about Java seem to be dated. The most often cit...
There are a lot of books on domain specific languages (DSLs). Such books talk about compilers, interpreters, parsing, lexing, semantic analysis, and other various bits someone needs to implement a DSL. I already know how to implement a DSL; I've implemented several. However, several such DSLs have been monsters to work...
I just started writing some ruby in my spare time and am currently using Netbeans 7 with the Ruby and Rails plugin v0.111. I'm primarily a Java programmer coming from IntelliJ and Eclipse. One downside of my Ruby programming setup is that my Netbeans isn't very helpful when it comes to code completion. This seems due t...
I am just join a firm and they are working in a (their called) SCRUM methodology, They have very sharp deadline and the project development doesnt seems to have any direction or neither it is looking like (This is what we want.) I am developing a module which doesnt have Database, neither I have any information which n...
In another question, I asked about why I feel scrum turns active developers into passive developers, and it seems that the overall problem is not scrumy (related to scrum), and rather it's related to the bad implementation of scrum. So, here I have some questions about the scope of the responsibilities of PO (product o...
How do you recursively delete paths of the data that your app created? The deleting process itself is trivial. The question is, do you do extra validation? And if so, what kind? From one point of view, maybe it's simply an uncomfortable task to do, but on the other, imagine if the program has a bug and something passes...
The section entitled Algorithmic Implementation has the following code: // Return RC low-pass filter output samples, given input samples, // time interval dt, and time constant RC function lowpass(real[0..n] x, real dt, real RC) var real[0..n] y var real α := dt / (RC + dt) y[0] := x[0] for i from 1 to ...
Every day, after the stand-up, my team and I update our estimates for each story. I have a feeling that there is something wrong with the way we do it, so I need your help. This is how we do: Story A estimate: 24 hours (8 hours per day - we use "ideal days" as the measure) Day N: developer starts working on Story A in...
Hypothetical: I’m based in the UK. I’ve developed an application only to discover after it has gone live, that someone else has filed a US Patent application for similar software. I don’t know if the patent will actually be granted, since the software-functionality has probably already existed long before now. Defi...
As a young software engineer, I often hear other colleagues talk about the days of punch cards and "computers as big as the room." The earliest memories of computers that I have involve MS DOS and Windows 3.1. My question is, are there still any companies, academic centers, or government agencies that still use mainfra...
Possible Duplicate: How do you keep track of the authors of code? One of my colleagues is in the habit of putting his name and email address in the head of each source file he works on, as author metadata. I am not; I prefer to rely on source control to tell me who I should be speaking to about a given set of funct...
First off, this question goes beyond my example (don't want this to be too localized or migrated to Stack Overflow) but I've come across this when thinking about something I wanted to try in C so I thought I'd use that as an example. So my idea is to create a generic linked list in C and started it last night and it is...
There is a software system that has been with the client for some time now. If is feature-rich, mature, complex enterprise application that client uses in production. Due to the rapid expansion of the client's business the software system in subject cannot handle the volumes efficiently and overall performance does not...
I'm not a software developer, but I have previously developed a project-specific Access application for another employer. My current employer would like me to help organize their workflow and data for an upcoming project, and I was considering using Access again. In previous projects the staff used large piles of Excel...
This is for the freelancers. In my past life as a full-time employee, I was involved in hiring and interviewed a good number of developers. I learned that it was much more valuable to see a developer work through a problem, however small, than to talk about experience, etc. Now I'm working as a freelancer/consultant. O...
I am new to static analysis of code. My application has a Cyclomatic complexity of 17,754. The application itself is only 37,672 lines of code. Is it valid to say that the complexity is high based on the lines of code? What exactly is the Cyclomatic complexity saying to me?
I have been familiarizing myself with LISP for self improvement purposes. One of the things I have noticed is that LISP is much more within the paradigm of Mathematics than say C. The syntax and design structure seems to echo directly the actual mathematical model of an algorithm. It doesn't make sense to me why even g...
Objective-C features nice object orientation, simplicity, elegance, and (as a superset of C), low level ability. It could seem like the simple, modern alternative to C++ that many people look for and try to find in Go. But it is just used at Cocoa and post-NextSTEP environments, and even in this case is seen more as a ...
A philosophical discussion has come up in my department that I'd like p.se's opinion on. We're a 6 person development department inside a 60 person IT shop. All other departments are growing FAST, and ours has been the same size (and not fully booked at that size) for a few years. My manager, and old-school mainframe g...
Could a class be a first-class object? If yes, how would the syntax for dynamically creating new classes look like? To narrow the question - how would you give this functionality while keeping language consistent? For example how you create reference for new type. Do you make reference first-class object too and then...
I invested most my time and resources in programming, and now I think it's time I should invest some time in learning about user interface design, user experience, and usability. What are some good resources about usability and designing user interfaces? I'm mainly looking for more theoretical topics, such as color the...
This post by Jamis Buck about keeping Rails controllers skinny has always stuck with me. I have an app in which a zip file consisting of an XML file and some images is uploaded and used to create the model (mostly from the xml file, which points to the images). Should all the code dealing with extracting the files from...
I was looking through various APIs and SDKs, when I realized that I couldn't really tell the difference between something called an API and something called an SDK. Both of them are, conceptually, a way for your program to interface with and control the resources provided by another piece of software, whether that othe...
I'm working on a small project which will only have one user at a time since it's a local application (developed in WPF and C#). To store data I was thinking of using an XML file but I'm wondering if this would be the best approach. What the data is for: Shedules Library of files in folders (with Artist name, Title, L...
With all the options and project available, especially the size of most of them, Open Source can be pretty daunting for a newbie to it all. My question is, how can I start helping and learning from open sourced software? Where do I start? Which files do I read first? Any advice to help a programmer above beginner level...
I'm interested in statistical computing. R is a leader platform obviously but what about Incanter? Incanter is at the top of my list since I'm a Clojure and JVM guy. Do you have any real world projects with Incanter? Is it a proven platform or I have to fall back to R? What are the advantages of R over Incanter? What I...
Are there any legal hassles when you work in these Casino kinds of industry? I'm offered a job and I like it owing to clever algorithms and multi-threaded enviornment. I'd like some advice on legal issues before taking the offer. *Ok I'm not going to sue any one of you for bad advice. I just wanted to know if people ha...
I am sure this question has been asked many times. However, I like to ask it again with the intention of what is the future of these languages. I was first introduced to Groovy and really liked it. I felt the syntax was simpler and it was much closer to Java and I was able to quickly learn Grails. Then there was Scala...
If you don't know WEKA, you can try a theoretical answer. I don't need literal code/examples... I have a huge data set of strings in which I want to cluster the strings to find the most related ones, these could as well be seen as duplicate. I already have a set of couples of string for which I know that they are dupli...
I currently have an open source project that is licensed under GPLv3. I'd like to dual license it, so I can offer it for commercial use. Are there any resources for choosing or creating a commercial software license?
I am doing unit testing. I am trying to test one function. I call it from my test component. But If remote function cannot handle the exception then my tester component will also get exception, I guess. So should I worry about getting exception in my tester component? Thanks. EDIT: PS: Throwing an error is good, but on...
Buying the best hardware, paying the most precious bonus or reward, treating them politely, provide the opportunity for improvement, etc.? We want to improve the productivity of our development team. We want to see what can be regarded the biggest support (or generally a good support), so we can start from there.
I'm about to extend a system containing two separate systems. Or domains, if we see the system as a domain level. Today One domain is used internally. The other is public, which means it is more exposed to whatever can happen "out there". Services of some kind (few options apply) perform operations between the two sepa...
I've been watching an interview with Herb Sutter on Channel9 and he mentioned at the end of the video that left to right language syntax would be on the top on his whishlist for a future C++ standard(although he acknowledges that modifying C++ in that way would pretty much make for a completely different beast). Apart ...
This just struck me as an oversight by Microsoft. Since arrays and other data-structures within the .NET framework begin from zero (zero-based) why don't we have a line 0 within the code view in Visual Studio? Ponder that one :-)
I have written a small front-end to the Festival TTS system using Python/Django. I wish to deploy it on the Google App Engine cloud. A few questions: My application uses the Festival app 'text2wave'. Will is work on the cloud? I have used Python primitives like subprocess.call() to invoke the aforementioned program. W...
I heard developers at my office discussing Ruby language can be used for following purposes: Desktop apps,Web Apps,and may be handheld devices. Actually,we are in phase of selecting technology to have scalability of the following: I have - Ruby made Desktop apps on each inventory unit of the big firm. And wish to syn...
I am authoring a IDE for the Lua language. I find that many programmers do not like to use IDE and prefer VIM (which is in vogue at the moment), SCiTE, or . In trying to win some mind-share I am interested in what features an IDE could provide that would make it a compelling alternative to a general purpose editor. Is...
Should the usage of Dependency Injection and an Inversion of Control container remove all occurrences of the "new" keyword from your code? In other words, should every object/dependency, no matter how simple or short-lived, be "registered" within your IoC container and injected into the method/class that needs to use t...
I have developed for Android for half a year or so and it is going quite well. I found the learning curve steep in the beginning, but then I somehow got the idea of it all and now I don't have to fight so much anymore. Rather I spend the time on specific problems like "How to do X in Android" but that is usually simple...
I must confess that I was not so strong in data structures when I graduated out of college. Throughout the campus placements during my graduation, I've witnessed that most of the biggie tech companies like Amazon, Microsoft etc focused mainly on data structures. It appears as if data structures is the only thing that t...
As a professional Java programmer, I've been trying to understand - why the hate toward Java for modern web applications? I've noticed a trend that out of modern day web startups, a relatively small percentage of them appears to be using Java (compared to Java's overall popularity). When I've asked a few about this, I...
I don't understand why people like to say "Images had to be distorted otherwise they would be easily cracked". I'm talking about those verification images that we had to type to identify that we are humans. Exactly what steps must we take to break even a simple image? like this: Ok so i'm guess we had to read all the ...
I work at a company that has repeatedly cut the sizes of its development team, to the point that previous 10-man teams are now down to one developer per product (and a couple of testers shared between 5 products). We used to be fairly process heavy, having been a spin off from a larger company, and inherited its multi...
I've seen not so many examples of testing with automatic tools, i.e. serializing/deserializing of JSON (which was paired in the following way: val actual = deserialize(serialize(string))), checking that appending symbols to string was done properly (and that's imho silly, cause it extremely hard to made a mistake in s...
I've been programming in Java, C#, Python and AS3 most of the time and in all of these languages there are packages (or something like that). The problem I found is with the naming convention, or even with the organization of the packages. I need someone to tell me WHY is this: com.company.app.type.Object or org.author...
Is it over-engineering if I add protection against a user's intentional wrongdoing (to put it mildly), if the harm the user can incur is not related to my code? To clarify, I'm exposing a simple JSON RESTful service like this: GET /items - to retrieve list of user's items PUT /items/id - to modify an item POST /items -...
There seems to be a growing trend for CMS systems to manage not only data capture and workflow, but to be an end-to-end product that manages presentation and end user content (like comments/forums). I thought it was a pretty ridiculous, but it seems like this approach is gaining more and more traction. It seems to me t...
I am looking for best practices that big organizations follow for code check-in and validations. Currently we follow these steps, - Developer writes code - Developer do some initial tests - Code is awaiting validation now - Technical lead reviews the code (possible bugs, see if coding convention is followed etc) - Onc...
At our company, we frequently use third-party libraries and frameworks in our products. Often, we are faced with the task of evaluating one or more libraries that full fill similar requirements (in a specific case we had to choose between some encryption libraries). We often do a simple prototype to try to figure out,...
I've recently finished the The Three Signs of a Miserable Job by Patrick Lencioni and one of his core ideas is that you need to have some form of measurement. I have a pretty standard internal developer job where I work on new tools and do some support/bug fixes for past tools I have written. For purely personal fulfil...
I'm going to ask what is probably quite a controversial question: "Should one of the most popular encodings, UTF-16, be considered harmful?" Why do I ask this question? How many programmers are aware of the fact that UTF-16 is actually a variable length encoding? By this I mean that there are code points that, represen...
Say you're working on designing the world's greatest iPhone app. How do you decide what UI would be more effective, would be more intuitive etc? How do you take an idea and decide how to visually represent it? Do you use any programs (on a mac) to model something like that?
Is there an encyclopedia of algorithms similar in style to the Handbook of Mathematics? It seems useful to have large numbers of them available in one place. I know the Art of Computer Programming is considered a good source but it does not seem encyclopedic so much as instructive. Moderator Note We're looking for lon...
From what I can tell, most developers will use heavy jQuery DOM manipulation tactics to deliver their updated AJAX views. Once things get out of hand, they may consider refactoring using template engines such as Mustache.js. Is this a valid assessment of a natural progression to use a template engine? When I begin a ne...
I have just started learning how to program using LPTHW, and as my skill level develops I would like to start shipping code whether or not it's ready to be shipped, just to get into the habit of always shipping code, and not having the fear of shipping code. Is there are a beginner friendly guide to shipping code?
I ve been a php developer for the past 4 years and worked in OO PHP and almost all sorts of PHP mvc frameworks. Ive joined a new company now and here we use scala for web development. We have a product which has a frontend developed in a js mvc and a backend in scala. Actually this kind of restful architecture itself i...
I am a junior programmer who works as an intern(8 mths into the internship) in a team of 1(myself only) creating mobile phone apps & websites. I have created an App that works exactly how it should & has some pretty cool features but the App fails to run on Android(the main target platform for us, it works on the desk...
Lets say I'm building community that uses some webapp. These webapp uses a a modified version a a GPLv2 licensed theme. Additionally the community uses a donation mechanism to fund itself. Donation overheads will be given back to the community in some form, so there is no commercial goal behind it. Questions: Am I req...
I've been programming in PHP for a long time, and I've just recently decided to make the switch to Python. Of all the Python web frameworks, I settled on Twisted Web to build the framework of my startup. However (and I know it sounds nitpicky), mod_rewrite was something that I really appreciated about Apache. I want th...
As a part of learning system programming, I am looking to implement a file shredder. The simplest way (and probably seen as naive) would be to replace the data bytes with zeroes (I know OS splits the files and I'll replace bytes in all those chunks). But when I google on this topic, I am surprised to find multiple pass...
Do you think programming novices should learn objects from day 1, as seen in the book "Objects First With Java: A Practical Introduction Using BlueJ" by David Barnes? Or do you think this is a bad idea? For those unfamiliar with the book, here is a list of the topics discussed in the chapters: Chapter 1 deals with the...
As stated in the question, is there any difference in the meaning of the two as applied to the Controls of .NET. Or are they alias of one another?
I recently started out working for a new client with an old legacy codebase in which there are multiple .net solutions, each typically hosts some projects unique to that solution but then "borrows" / "links in" (add existing project) some other projects which technically belongs to other solutions (at least if you go b...
I realise these two diagrams are very similar, with the obvious difference one models the sequence of a certain function, whilst the other models the state throughout a function being carried out. The differences that I have identified are as follows - probably incorrect: State chart is more of a logical view of any f...
So if I understand correctly, from SOLID design principles, every class should keep a single responsibility. So there should be one class that creates and manages a resources, a second class that does resource processing/update, the third class that connects the resource to some other resource and so on. The question i...
Possible Duplicate: Why do most of us use 'i' as a loop counter variable? Maybe this questions seems to be extreamly stupid but I wonder why we use i as variable in most cases in for loops (and not other letter). This might be a historical cause. eg. for(int i = 0; i < 10; i++)
In another question I asked recently about best practices for whiteboarding, there was general consensus that thinking out loud while coming up with the answer was the best strategy. Indeed, long moments of silence are awkward. However after recent interviews I have noticed that if my thinking out loud leads to wrong ...
I'm currently developing v2.0 of my personal cms. However, I'm stuck. I strongly feel that my old solution for "tasks" is not very dynamic and must be revisited. Currently I'm looking the whole concept of how to dynamically add tasks and run them. What I mean by task system Like always in cms software, there are a lot ...
Do software developers who choose not to put code optimization, standards and best practices as a top priority, create more useful code than those developers who want to worry about optimization, implementation of coding standards and practices above completing tasks on time? How do these differing methodologies compar...
I am working in IT department of a big, international company. We are developing different Intranet applications for the business (Complaints, Rebates, Service Desk etc). Now we decided to migrate from PHP platform to .NET (integration with MS CRM Dynamics, Exchange and MS Office be among many reasons). As there are ab...