Tag Info

Hot answers tagged

58

There are several things you can and should do to prepare for the task: Think about the problem and draw some diagrams. Make sure that you know what the problem is that you are trying to solve. Do research on what you are trying to do. The internet is a valuable source of information. I am not saying ask Stack Overflow -- I am saying do research on how ...


26

There is no perfect solution, but some things that might help: Break tasks down into the smallest possible units -- break them down until you have things you can do. Restate the immediate task or problem at hand to make sure you really understand it. Then do some analysis and repeat. Pick the simplest task first, even if it seems too simple just to get ...


17

Of course you have no idea how to write a "generic error mechanism". No one knows how to write a "generic error mechanism" until some requirements are defined. It sounds like all you have is someone's notion that a "generic error mechanism" is somehow required to start this project. Personally, I would push back on this notion. Writing "generic" anything ...


12

A test is a test, and what you described is an application, not a test. Don't write code that you don't want run again and again and again as a unit test. Write a console app, or a winforms app, or an add-in or whatever, but NOT as a test. Feel free to write a unit test for your code, though. What you think is a one-off code will often wind up sticking ...


11

I think you're suffering more from anxiety than a skill deficit. At some point, wasn't everything new? Have you ever been given a task and not been able to solve it to some extent? You're paid to figure things out. Utilize Your Team - If you're on a good team, you should be able to ask for help. There are things you'll know that even the most senior won't ...


9

Option 1 creates a tight-coupling between the domain model and the view. This contravenes the very problem view models are designed to solve. A view models "reason to change" is if the view itself changes. By putting a domain model object in the view model, you're introducing another reason to change (eg the domain changed). This is a clear indication of a ...


7

You might want to look at the answer to this similar question here: http://stackoverflow.com/questions/11329823/add-where-clauses-to-sql-dynamically-programmatically We've found that a SPROC which takes in a bunch of optional parameters and implements the filter like this : CREATE PROC MyProc (@optionalParam1 NVARCHAR(50)=NULL, @optionalParam2 INT=NULL) AS ...


6

Rejoice in that you aren't doing something you've done a hundred times before. You've found the joy of software development (for me, anyway, YMMV) - learning how to drive while you hurtle down the freeway at extraordinary speeds. This is the kind of thing a great developer lives for and excels at. My personal process is something like this: Research. Find ...


6

It depends... its all about dependency management. You're going to have a lot easier time with a single solution. This is so you can simply reference the other projects within a project and it'll all build and will be up to date everytime. This approach doesn't scale though. So the problem is entirely down to those pesky references. The biggest problem I ...


5

The only ethical considerations that I can think of are those relating to accessibility, for which there might even be legal implications. Otherwise, it's just a choice, as is the choice of some users deciding not to use your software because you forced them to use Javascript. That said, students are generally tech-savvy enough that the overwhelming ...


4

Start with whatever you think is easier to implement (I guess option 2). Then measure the performance for real world data. Only start optimizing when needed, not beforehand. By the way, depending on how complex your search filters are, your task may not be easily solved without dynamic SQL. So even when you use a stored procedure, that most probably won't ...


4

hang on - you want to write a unit test that actually performs the work you want doing?? It does seem to me that you've violating the principle of keeping it simple, by trying to fudge unit test framework to do something it wasn't intended. Make a console app, it'll be easier to deploy to an environment that might not have your version of the dev tools ...


3

That's quite the Ruby approach. Keep the core language simple and extend via gems Create dialects of Ruby for specific domains via monkey patching. i.g Ruby on Rails. I don't know if this is better, but I guess is very pragmatic.


3

I've been advocating DSLs for a long time, but I worry about what happens to Good Ideas when they become bandwagons. Products get built that advertise The Good Idea, promising all you have to do is get one, and you'll be in the in-group, without having to think very carefully about what it means. What is a language? It's a vocabulary and syntax in which ...


3

Aren't you, maybe, overthinking this concern a little? Anyway: in the past I saw people advocating black, dark, and grey web designs, with the rationale that it consumes less energy. This could have had made a very little sense with CRT monitors, (though the save was pretty negligible and all) with LCD displays it is now complete nonsense. (backlight: ...


3

You probably want some equivalent of the Portland, OR based Sustainability at Work program to help you understand the parameters. You may have a more locally suitable program, but the general framework will be similar enough to answer your general question.


3

Do 1 thing at a time and progress to the 2nd thing only after you're done with the first. You missed those [httpPost] bits because you didn't write a controller, and all its associated code, you went straight to the next one before you'd completed the first. We all do it to some extent, and its generally caused by coding away oblivious to what your code is ...


2

I think for this kind of application, a generate button would probably be undesirable from a UX perspective, especially if the operation performed is as trivial as you make it sound. Here's what I hacked together in a few minutes, for what I think you are approximately describing: http://jsfiddle.net/qtY38/4/ (Is jsfiddle still en-vogue?) The meat being: ...


2

This is fairly generic advice for any problem, but it may help. Start with the data. Work out what information you'll need to store, how each piece of information relates to the others. If you get the data structure wrong, you can spend an incredible amount of time writing code to "force" it into the correct structure. Caching is "easy to apply" late in ...


2

Principles and mantras are sometimes valuable for guiding design... but here's my practical answer: Imagine your view models being serialized into JSON or XML. If you try and serialize your domain models you're going to end up with a hideous mess of text and most likely run into issues with circular references and other issues. The purpose of a view model ...


2

Option 1 is preferable as it avoids code duplication. That's it. If the domain model changes significantly , it's almost certain that the view will have to change anyway. With option 2, then you have to change the view model AND the builder as well as the view itself. That kind of thing is absolute poison for maintinability. YAGNI. The point of having a ...


2

I would consider having "auto-approved" tags for the cases where a Level 2 or 3 user creates a request. My presumption is that you are tracking: who creates who approves at level 2 who approves at level 3 So your status could then go through the following: User_submit Approved_Level2 or Auto_Approved_L2 Approved_Level3 or Auto_Approved_L3 ...


2

Is it a unit test? some one-off code in c#.net that will do some db manipulation Ok. Database manipulation doesn't mean database access. You may have used a mock of the database in order to concentrate on the manipulation itself. of existing records So the code should work for only a predefined set of data? If you're not creating data processing ...


2

I think you're looking at this the wrong way. What is the purpose of a unit test? To test that some piece of code works correctly. If that's not what you want to do, then don't use a unit test. What you should do is to create a separate console application that references your other projects. This way, you can use all the code you already have. A good place ...


2

In a comment, you said: What i am tryin to get out of this post is WHY not to do it. Unit tests are meant to run to check that code works as intended. Because of this, they are often (I wish I could say "always") used with continuous integration, and automatically run whenever a new commit was made to the code. This can be several times in an hour, ...


2

IMHO it's not really the application that is not tied to a DB structure but its architecture. In that case, we'll speak about Clean Architecture. As Uncle Bob says: a good architecture allows you to defer critical decisions like the UI, frameworks, database, etc Have a look at this pretty interesting article as well, where it tells why: ...


1

Because I am a web developer, I am using web technologies to solve the problem. I'm afraid of my limited mindset and picking wrong tools for the job. You're falling into the "when all you have is a hammer, everything looks like a nail" trap. But you're able to recognize it, which is a very good thing. Is HTTP/HTTPS good enough for file ...


1

Is HTTP/HTTPS good enough for file transfer? Many applications rely on HTTP/HTTPS for file transfers, best example is mega.com. So as you mentioned there may be better ways to keep it in sync, but it's not definitely wrong to use HTTP/HTTPS for file transfers. Is Node.js good enough for working with File System? Node.js is a really great system and of ...


1

Option 2 of course. Why would you want to store extra garbage data? It will just confuse things, and adds NO value.


1

That's a pretty good approach. You've separated the concerns into projects and referenced the projects where they are used. That's good. Since you've tagged this Visual Studio, I'm going to share how I structure my .NET software projects. Typically I'll have these three projects, each contained within a single Visual Studio solution (.sln): PointOfSale ...



Only top voted, non community-wiki answers of a minimum length are eligible