instruction stringlengths 34 36.1k |
|---|
The UNIX Programming Environment (the classic text) states that the UNIX approach to programming is to build small, well-defined tools that can be combined to solve more complex problems. In learning C and the Bash shell, I've found this to be a powerful concept that can be used to deal with a wide range of programming... |
I made an application in EXTJS, but my technical architect and project manager say we don't want big file, so removed the EXTJS and made in object oriented PHP and JavaScript code, mixing HTML with PHP.
But I don't want to mix HTML and PHP because of bad coding structure and bad coding practice.
What should i do?
|
Before Martin Fowler's book "Refactoring: Improving the Design of Existing Code" came out, we used to call major changes to code "rearchitecture" and minor changes "cleanup". IMO, refactoring techniques are all common sense / obvious things we've been doing forever.
Do you think refactoring was ever anything new? Perh... |
I'm currently refactoring my DLL and BLL and I need some advice on what is the best way to work with DAL and BLL.
My current solution is like this:
// DAL class only consists of SQL queries and returns SQL result
class DAL {
public function isBrandInList($brand)
{
$sql ="SELECT id FROM sl_label WHERE name = '... |
As high level programming languages such as C#, Java, etc. are developing, many people claim that they will be an alternative to languages such as assembly language and C/C++, which gives you access and control to computer hardware, because programmers should focus on creating the program and solve problem, not wasting... |
I've got a problem.
I find really difficult to foresee the effect that my changes to the code will have over the whole application, either when I have to add new features or re-factor it. Very often it is not until testing time that I find out that I should have done things in a different way or that those changes prod... |
My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this?
|
I am sure that this question will piss off some people, but that is not my intent. We are all in the same boat - I will be subject to it one day as well.
According to Milton Friedman's view, who was not a theoretician, discrimination in the work place can only go so far, for there will be employers out there willing to... |
My company has been using Java (as a language and a platform) for many years. We have lots of products varying greatly in size, purpose and complexity. Whatever the requirements, the answer is always the same - Java. This stance obviously has advantages and disadvantages. On a plus side, there is no context switching b... |
I've been studying a beginners guide to ASP.NET 4 for the past month and a half, and I'm at the end of the books. The next book will be one up (Professional guide).
As yet I've only programmed exercise that are in the books, not my own code.
When should I start developing my own code? After reading both books?
Also I... |
So, I am primarily a .Net developer who does some stuff in Java, Python and a few others from time to time. I have heard a lot of people praise Vim and Emacs for greatly increasing efficiency once the basics are nailed down. I can definitely see how many of the features could be very useful with sufficient practice, an... |
In your ASP.NET MVC 3 applications that use a DataContext or DbContext, where do you instantiate your data access object?
Here is a non-exhaustive list of where I've seen it done:
Individually within each method of the controller
In the controller's constructor
As a property (lazy-initialized) of the controller
In an ... |
Making a project estimation with given a requirements set is one thing.
But, what happens when the user suddenly starts changing them on the fly and starts adding new requirements to the already defined set? And even goes to an extent to be mad about why the project is not finished in the originally planned time frame... |
Please explain in layman's terms.
|
I'm doing some prototyping locally that I would like to keep in source control (for backup and revert purposes) but I don't necessarily want to publish it as open-source or make available online for others to view.
What source control system would you recommend for local development? Any setup or walk through for my s... |
Well, does it? Is it considered bad practice?
IMO, it is less readable. I hate having to scroll to the right, then back left, right, left, and so on. It makes coding more painful and confuses me sometimes.
For example, anytime I am coding a long string, I will do the following...
bigLongSqlStatement = "select * from so... |
I often see code that include intentional misspellings of common words that for better or worse have become reserved words:
klass or clazz for class: Class clazz = ThisClass.class
kount for count in SQL: count(*) AS kount
Personally I find this decreases readability. In my own practice I haven't found too many cases... |
I am new to scrum, project management in general, and i am having problems deciding what to call a feature or a sub-feature (which are tasklists to creating that feature?) especially for the standard things we have in every web app.
So i am looking for best practices on how people are creating product backlogs for a ty... |
I have an ugly bit of code - essentially iteration over some data structures where the meat of the action was changing, but the iteration code stayed same. The iteration constituted the bulk of code, and there were at least four cases of code copying.
So I refactored the code, putting each level of iteration into its o... |
We use assertions to check for illegal behaviour which just shouldn't happen if everything is working as it should be, such as using NULL as argument when it clearly shouldn't.
This is all very well when you write public functions since you can't trust that the programmer who will use them won't make a mistake. But wha... |
In the following code:
<a onclick="javascript:alert()">
how do you name the javascript: part? Protocol, pseudo-protocol, scheme, label, prefix?
I am only trying to figure out a common name for it, not technically correct term based on what it actually is at the end. So when I say for example "javascript protocol" mo... |
I don't know how to exactly search for this topic, so if there are a lot of answers to that, please just provide a link :)
I'm getting a new laptop in a few weeks and am thinking about setting up a logical, easy-to-use and clean folder structure for coding from the beginning.(mixing everything coding related now)
My q... |
What are some of the biggest issues/pitfalls with using the Grails framework? I'm learning the framework now, and I really like it, but I need to know what major issues I may encounter when using it and how to avoid them.
|
I am thinking about how software like Microsoft Windows grows from small as MS-DOS to Windows 7, Adobe Photoshop from its first version to version CS5. What techniques were used to accomplish this? Did they extend their software from the existing software or redesign for the next version? Or have they already planned t... |
DDD promotes rich domain models with behavior in it, POCO naked objects without any objects in it. Is it possible to have them both combined?
I have a Multi Layer Solution
Core - has POCO Entieties, interfaces for Repositories and Services
Data - Repository implementations
Service - Service Implementations
Infra - Io... |
I work at a Fortune 500 company as a Windows software developer in R&D. Corporate IT is currently gearing up for a company-wide Win7 deployment and as a part of it they are looking to completely lock down admin rights on all boxes (including our dev workstations).
I've been tasked to work with them to make the transiti... |
At my last interview(it was a phone interview) I was asked: "Which is the time period in which you can learn Java?". I've answered that I believe that in 2-3 month I'm able to write good code for non-fancy/regular applications. After that I observed that the employer took a long break and switched to other questions. N... |
given Apple's bizarre geographical segregation I was wondering if, as an Italian, I am allowed to create an English application sold on the US app store for $0.99 (regardless of the current USD <=> EUR exchange rates).
It seems a really stupid question and I really hope that I can but who knows, since I can't buy them ... |
Interesting post by Seth Grodin by increasing productivity by specifying one device for work and one for everything else. Would you be more productive if you only programmed on one machine and forced yourself to surf, chat, email, and play games on another device or would it hinder productivity?
If your boss saw you o... |
I have programmed in Obj C and C, but until now found that I dont fully understand the steps in taking the software from source code to executable,
I found this image
kind of explaining it (sorry couldn't upload as I'm new
but I still not get when the debugger, make, builder come into action, when it goes to asm and... |
what do you think about this design?
In this image i have reported the dependencies between packages. I would like to reduce the coupling between them, but do you have any idea about how to do this? I think it is impossible to reduce it more than this. The Preferences package is responsible to manage program options,... |
What open source Java code would you suggest for me to study?
EDIT: I'm interested in the design, simplicity(?), their programming style, logic.
EDIT2: The first thing that came to my mind is JUnit source code. I started looking into it and I was impressed by how 'Money' is designed/represented. Similarly are there a... |
Introduction to my situation
I work for a small web development company. We have a team of four ASP.NET developers, including me. Almost all of our projects (> 98%) are one-person projects that take about 1-4 weeks to complete. We don't use source or version control. The only thing we have is a shared folder on a local... |
I want to explain design patterns to my niece, but always struggle in doing so. It is largely due to my lack of clear understanding of design patterns. How do you suggest explaining patterns like MVC,Singleton,Factory,Repository etc in such simple terms that even kids of 10 years old can understand.
I'm looking for exa... |
Here are some arguments for properties and my counter-arguments:
Easier to use than writing getter and setter methods
Getter and setter method pairs are a code smell. Making it easier to write these is like making it easier to fail a math test by using a Scantron form and filling in all 'C's. Objects that contain only... |
Since the early days of my college life I have been using Java and biggest problem that we have is absolutely being less productive than other interpreted languages. All people are sure that java is one of the best compiled language.
However, neither Sun nor Oracle has put enough effort in to solve this problem. One of... |
Looking for suggestions on finding code to review, or to be more clear, code on SE sites with excepted working code -- to suggest be posted to CodeReview.SE for optimization.
The source of this question was another question I posted on CodeReview.SE.meta
Growing Code Review, One Idea... :-)
In which I got this reply:
... |
Am Programmer cum Co-Founder of Start-up,Am a computer Science Graduate though am not good at Algorithms,I want to learn and sharp that side.Please suggest me some nice books for starters and Advance Level.
|
Not posting a question of my own per se, but I am a ".NET developer". I read the following article about one startup CEO's opinion of hiring .NET experienced developers. He has some comments on the blog but not much of a discussion format as what's possible here. I also know nothing about this man, or am promoting his ... |
The name "Golden Master" evokes a level of martial arts proficiency or maybe even a final cut of a film. I think context clues provide adequate explanation of a Golden Master release. I would define it as the version of a software [product] that has been approved as the release version following a pre-determined phase... |
I recently read Crockford's book "Javascript: The Good Parts" and one of the underlying premises was that programming languages can have bad sets of features which programmers should avoid.
I'm a Rubyist and whilst I love the language there's always value in getting perspective. So, what do you see as the worst feature... |
Just completed the first pass through Peter Siebel's Practical Common Lisp. I'm fairly comfortable with C#, Ruby, Java; The chapters that teach Lisp and the early 'practical' chapters were easy on my brain.
However towards the end of the book, the practical chapters (on binary serialization, id3 parsing, web programmin... |
I'm learning Python, and I wanted to advance my skills a bit further so I decided to learn django, then moved on to Flask before realizing that I was having difficulties understanding the very concept of web-frameworks. I don't have any ideas for a website yet so do you still advise me to continue learning a web framew... |
I am looking for a good CI solution for a haskell project. Ideally something that will work with git. Really basic need (so far) build and run tests after each check in. Some basic reporting would be great too, but it does not need to be anything real fancy. It should also support running javascript tests in a browser.... |
Use of EL in JSP's is the proper way to code logic according to the Sun tutorials and samples, which also recommend against the use of Java scriptlets. Yet searching job listings for EL | "expression language" in the SF bay area on craigslist yields 0 hits (vs 144 for jsp, 8 for jstl and 678 for java. this is searching... |
I've always heard that C is the language of choice to use for embedded systems, or anything that needs to run at maximum speed. I never developed a fondness for C, mostly because I don't like pointer arithmetic and the language is barely a rung above assembler.
On the other hand, ML languages are functional, garbage c... |
In the setting of an interview: What is the best way to reliably identify when somebody is an excellent programmer. By this I mean he is one of those that is 10-15 times more efficient / rapid / better than his peers towards the lower end of the spectrum.
Many of us have heard of the FizzBuzz Problem as a way to weed... |
Are there types of killer applications, classes of algorithmic problems, etc., where it is better, in the long run, to create my own language?
PS: Just to be sure, I mean a new programming language and a compiler, not a new compiler for an existing language.
EDIT: Thank you for the answers. Can you provide some example... |
I have tried to learn C++ and Java before, but the syntax confused me. I definitely will be learning them after, but for now, where is the best place for a guy who has programmed before to learn python? Do you concur with me learning Python? Should I stick with Java or C++ before?
|
There's a workflow I'm working on. It's so far been web forms filling databases with occasional writing configuration scripts for analysis instruments instruments, and I've written it all, in Perl, Javascript, HTML, Javascript, MySQL.
And right now, the task in front of me is generating a post-instrument analysis Bash... |
I have a specific requirement. Lets say we have 3 items and a user has selected all 3 items to buy. I need to lock the 3 items (meaning the other people who want to buy the same items cannot view it) for around 10 minutes. How do I implement this?
I am developing a Java web app using Hibernate and struts.
|
Follow up to this question
So a lot has changed in the smartphone market in the last year (Specifically Androids market share, OS updates and marketplace updates). Given these changes I think it is appropriate to ask this question again.
I would love to quit my job and write Android apps fulltime. :-)
Is this yet feasi... |
Not Counting the OS And the requirements to run the Development software. The storage space required.
Strictly speaking from work perspective(company setup and not freelancers).A individual developer ( not considering a build system) unless into areas of video,audio processing( huge raw files) 3d/graphics development... |
I am currently trying to organize a small workshop for several people to generate interest in android. I intend to conduct a hands-on workshop, taking everyone through various components and features by building an app.
One way I can think to do this is to write an app before hand, share it with everyone and then try t... |
In many companies there is a formal procedure of reviewing employees' work.
For example, a salesperson can stay she'll sell one million units at the beginning of the year. When she comes up for review a year later, she says she's sold two million units. Thus, her manager decides to promote her.
But what should develop... |
I have a big table with 1,400,000 rows, and I need to insert 3000 rows daily in it.
When I insert 3000 rows daily should
I first insert to a temporary table than dump that temporary table to the main table.
insert directly to the big table.
Which approach is fast and why?
|
Which is the best Git library in Ruby to use?
Git, Grit, Rugged, Other?
Background: I'm the current maintainer of TicGit-ng which is a distributed offline ticket system built on git, and I've read and heard over and over again that Grit is the one I should use because it supersedes the Git gem, but there seems to be ... |
I have a PHP project that I'm currently developing.
I'm nearly finished and I was wondering what is the best practice when it comes to beta testing and deploying updates/changes to the production site?
For example, in order to test out new features, I thought about creating a sub-domain called beta.mysite.com that uses... |
I made an application in extjs, and it was rejected by my technical architect, project manager, and team leader because it was a big JavaScript file. It feels very bad when you develop an application and it is rejected by your seniors.
I don't want to feel bad and I want to concentrate on my work. I would like to restr... |
If I used a GPL-licensed Javascript library in a web application, would I then have to offer source code of the whole site to anyone who downloaded and executed the Javascript lib?
|
Are C or C++ regular languages? If not, under which category do we place the programming languages like C/C++, perl, Python?
|
In a response to another question, a poster suggested that under the GPL:
...you need to provide the human readable [code], not a whitespace stripped version...
Readability would seem to me to be subjective and unlikely to be explicitly required by the GPL. Is it?
|
I am currently designing a API and have come to a slight design issue and was hoping for a few other opinions. My url structure for accessing basic data from the API is: /clientName/appName/methodName/. Basically each client may have a different set of methods for each application, so the base application class is ex... |
The misunderstanding of floating point arithmetic and its short-comings is a major cause of surprise and confusion in programming (consider the number of questions on Stack Overflow pertaining to "numbers not adding correctly"). Considering many programmers have yet to understand its implications, it has the potential ... |
I am interested in the architecture, methods and software used by your company to capture and store knowledge.
Is the information easily searchable (especially by non-techies) ?
Is it stored in a central repository or in several places ?
Do you find the current implementation adequate ? What could be improved ?
|
I'm writing the Software Requirement Specification document for a piece of software that I am developing. A part of the SRS is the identification of the user class.
Can somebody please give or refer me to definition of a user class as it relates to a software product?
|
I was curious about what cross-platform framework does the developers of high profiles applications such as Photoshop, Guitar Pro, etc; use. They all integrate seamlessly with the OS to the point where you can sometimes assume that the application was developed exclusively for that OS.
I have been programming with Qt ... |
I am wondering what phrases that would have the most impact when approaching a business, to inform them why they should test their software.
Obviously you have easy ones; reduce costs/risk, improves stability/reliability/usability. But these are just words, how would you wrap them into something concrete that even peop... |
Say you have this task in an application that consists of two parts:
1) Delivery of a file to an external system (not in your control)
2) A database transaction in our system, with information about said delivery (what was sent, when and by whom)
If any of these two parts fail, our system's state will be inconsistent. ... |
The only things that I know:
An assessment day is much more than a simple interview. Actually 1 or more interviews are just a part of it.
Both individual and group based programming activities are involved.
Any ideas about what kind of programming activities to expect (preferably by people who have already participat... |
I always supported the idea of having coding rules for developers in a company or a specific project. Especially if the company is size greater than 10. The bigger the company the bigger the need. I know a lot of people will disagree, but I have seen projects that don't have them and the code looks like total disaster.... |
I started with ActionScript 2.0 and then went on with Java. I have learned, or at least used, a bunch of languages since then, including Python (probably my favorite).
I'm afraid that my style of object oriented programming is very unpythonic though, and more like Java OOP with Python syntax. What makes Java like and P... |
I'm preparing questions for job interviews for a senior development position. The job would include object oriented design, and the existing software uses design patterns, so I'd like to ask the candidates to explain a few design patterns they know, they've used, how they've used them, why they've used them and so on. ... |
I'm working on a website where we expect many of our users to be under 18. Our lawyer told us that anyone under 18 will need their parents to agree to the Terms of Service, since they aren't legally able to do it themselves.
So my question is, how thoroughly do we need to verify a user's age? Is it enough to just a... |
Recently at work we've been having some differences of opinion with regard to Parameterized testing. Normally we use a TDD-style (or at least try to) so I understand the benefits of that approac. However, I'm struggling to see the gain parameterized tests bring. For reference, we work on a service and it's libraries wh... |
What is better for performance to write the loop as linear e.g. for , while or
write it as recursion ?
|
I've been a freelance developer for many years and am setting up a system designed to attract clients through one of my developer websites.
If successful, these would be clients I do not know, and some jobs may be very small. When working with clients I know on larger projects, I'm accustomed to doing the work before I... |
At my work, typically the developers here all work separately, we may share projects but often only do so when another isn't working on it (for reference, we're a consulting company. So someone may work on project A one month, then three months late, I may too).
What methodologies can we use to improve the quality of t... |
At work, we use a bug tracker called Pivotal Tracker (www.pivotaltracker.com) that allows engineers to file features and bugs. If a feature or bug fix is delivered, it is QA's job to accept or reject it accordingly.
If an engineer implements a new feature that has a bug in it, should QA accept that feature and file the... |
I'll try to keep this simple.
Small C# app, dialog based, one has a DataGridView.
I've got an UpdateTable function in the form that accepts a DataSet and passes it to the DataGridView.DataSource. The DataGridView has columns defined already.
I've never used DataGridView and whatnot, so I was doing a bit of testing ... |
What open source projects would you recommend for people to study to learn how the pros write Scala?
Some of the attributes that I'm looking for - though they don't all have to be present in every exemplary project:
Idiomatic use of the language and libraries
Functional programming techniques
Concurrency (using Actors... |
Is there a way to play the role of Javascript with any other language like C#? One way came up in my head is, having silverlight installed, using C# instead of Javascript for all the client side scripting (Though C# is not a scripting language). Is it possible?
I am not talking about something like GWT(Java) or Script#... |
Ever heard of a company awarding bounty points for bugfixes? Making team members work to do the most, as some bonus money will be dependent on it? Having them split, or pay bounties to others to test, so they don't 'lose' points when it reaches a UAT environment?
I heard this from management for the first time today.... |
We are deploying and upkeeping web-sites to different customers. Normally we wait for newest changes to stabilize, then tag subversion version as release, and install than version to customer. Then we receive support requests, and sometimes are forced to make quick bugfixes between releases. I find it troublesome to up... |
I graduated 8 years ago and did a discrete mathematics course in my 2nd year, but I've been told that I'll likely be asked discrete maths questions in an upcoming interview.
Is there a simple webpage/document that I can use to refresh my memory? I understood the concepts when I took the course 10 odd years ago, but my ... |
We're going to do a complete review of a Java/JEE based application. This includes an architecture review, code review and platform hardware review.
While we're a bit aware of code review techniques, I'm wondering if there is a template or reference model for doing an architecture review for Java/JEE systems.
Currently... |
How much of your code do you unit test? Do you try to get 100% coverage of everything or do you skip some classes?
Background
We've made a lightweight ORM layer which we have written plenty of tests for. On top of that we use Code Contracts to specify what each method in every interface should accept and return.
Classe... |
I have a set of single purpose functions that I need in two separate controllers. Right now I just have duplicate code and I want to get rid of it. This code is part of the controller and doesn't belong in my service layer. Where would you put it?
|
I'm thinking of things like:
designating a developer having say 6 hours out of their normal 7.5 hour day dedicated to the project, the rest for other work/company related activity (meetings, emails, calls etc), maybe a senior dev is less.
building in 20% contingency time to estimates.
What are the best ways to produc... |
I consider myself a high level software developer. I enjoy reading a lot, and it's helped me over the course of my career. I think I am doing well.
Right now, I spend a lot of time learning new things. I don't suck when it comes to writing code right now, but I'm about to start a family, and I regularly see many senior... |
Hi
I am learning design patterns from a book . How to figure out the actual production code where it is implemented .
For example , if I am learning strategy pattern , it might be implemented in Spring framework . But how to go and search there and see it .
Do you guys have any easy ways of finding such stuff ?
|
I'm looking to start a new application and I want to use Dependency Injection. I have a lot of "Microsoft is the only way to go guys" in our shop so of course Unity is the way they wanted to go. However I am leaning more towards Autfac because of its speed and its Module feature. I found the speed results on this page.... |
In my less experienced days I added a lot of business logic in the code behind of my .aspx. Now I'm revisiting it I would like to refactor the mess and get it all sorted out.
How do I go about this? If I am to move my logic, where do I put it? Do I have a seperate class for each page?
|
I've read a blog(in Chinese only) in which the author had jeered at Java programmers who know little about C and system programming.
The author illustrated how he had found the deep reason of a Java NIO Selector exception using his knownledge of C and Windows/Linux system API. The IOException is thrown with message "Un... |
I'm looking for a good analogy or metaphor that could illustrate the problems of copy-paste programming to non-programmers. I occasionally do code/system reviews for potential clients, and one of the common problems I see are vast amounts of copy-paste code all over their code bases. It's something I routinely call out... |
I have worked with a client for two weeks who knows nothing about the complexity of programming a CMS. After two weeks, our relationship has gone from mildly discomforting to the point where I have said "forget this, I quit if you are going to act like this".
Problem is we have two week's worth of code developed (on my... |
Today I noticed that I basically never use protected methods in C++ code, because I rarely feel the need to call non-public methods of a parent. I do use protected in Java in the template method pattern, but since you can override private methods in C++, I don't need protected there, either.
So what are some real-world... |
I have a software problem that fits the functional approach to programming, but the target market will be on the Android OS. I ask because there are functional languages that compile to Java's VM, but Dalvik bytecode != Java bytecode.
Alternatively, do you know if the dx utility can intelligently convert the .class fi... |
I have a friend that works for a company. They use a software product that is aged, and written in Delphi. There are concerns at this company about the life of the software company that provides the software (which they pay a monthly license to use). It's quite specific software.
My friend has spoken to his boss and... |
Projects that increase online anonymity, such as Tor and bitcoin, allow personal freedom from government oppression but also allow crimes to go unpunished.
As a developer, should I contribute to such projects?
Is there a way to enforce that those technologies will not be used for money laundering and child pornography?... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.